Skip to content
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
5 changes: 5 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
version:
required: false
type: string
commit_sha:
required: false
type: string

env:
ECR_REPOSITORY: "provider-sample-url-finder"
Expand All @@ -19,6 +22,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit_sha }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/publish-new-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ubuntu-latest
needs: code-check
if: ${{ github.ref_name == 'main' && inputs.version != '' }}
outputs:
commit_sha: ${{ steps.commit-version.outputs.commit_sha }}

steps:
- name: Checkout code
Expand All @@ -46,9 +48,11 @@ jobs:
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

- name: Commit version change
id: commit-version
run: |
git commit -am "Update version to ${{ inputs.version }}"
git push origin main
echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

build-and-publish:
needs:
Expand All @@ -61,6 +65,7 @@ jobs:
uses: ./.github/workflows/build-docker-image.yml
with:
version: ${{ inputs.version }}
commit_sha: ${{ github.ref_name == 'main' && inputs.version != '' && needs.bump-version.outputs.commit_sha || '' }}
secrets: inherit

git-tag:
Expand All @@ -74,6 +79,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ needs.bump-version.outputs.commit_sha }}

- name: Create and push tag
run: |
Expand Down
Loading