Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

chore: Refine CICD with cleanups #405

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- 'main'
- 'release/[0-9]+.[0-9]+'
tags: ['v[0-9]+.[0-9]+.[0-9]+']
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]

jobs:
code_quality_check:
Expand All @@ -19,10 +19,10 @@ jobs:
setup_env:
uses: ./.github/workflows/setup-environment.yml

build:
build_image:
needs:
- code_quality_check
- setup_env
- code_quality_check
uses: ./.github/workflows/image-build.yml
secrets: inherit
with:
Expand All @@ -32,8 +32,8 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/heads/main') }}
uses: ./.github/workflows/image-publish.yml
needs:
- build
- setup_env
- build_image
secrets: inherit
with:
gar_push_enabled: true
Expand All @@ -45,8 +45,8 @@ jobs:
if: startsWith(github.ref, 'refs/heads/release/')
uses: ./.github/workflows/image-publish.yml
needs:
- build
- setup_env
- build_image
secrets: inherit
with:
gar_push_enabled: true
Expand All @@ -58,12 +58,41 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/workflows/image-publish.yml
needs:
- build
- setup_env
- build_image
secrets: inherit
with:
gar_push_enabled: true
ecr_push_enabled: true
gar_image_name: us-docker.pkg.dev/vorvan/dev/h2oai-modelscoring-restscorer
ecr_image_name: 926522735405.dkr.ecr.us-east-1.amazonaws.com/h2oai-modelscoring-restscorer
image_tags: "v${{ needs.setup_env.outputs.release_version }}"

release:
needs:
- setup_env
- publish_release
name: Prepare Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate changelogs
id: changelog
uses: requarks/changelog-action@v1.10.2
with:
token: ${{ github.token }}
tag: "v${{ needs.setup_env.outputs.release_version }}"
writeToFile: false

- name: Release action
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: false
draft: false
tag: "v${{ needs.setup_env.outputs.release_version }}"
body: ${{ steps.changelog.outputs.changes }}
prerelease: false
2 changes: 1 addition & 1 deletion .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build image and template artifact
name: Build Images

on:
workflow_call:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish image and template artifact
name: Publish Images

on:
workflow_call:
Expand Down