Skip to content

Commit

Permalink
fix(ci): use the correct commit sha for agent/monorepo image tags (#4052
Browse files Browse the repository at this point in the history
)

- use the correct commit hash for the agent and monorepo image tag
- the actual checked out commit was correct, but this now ensures that
the TAG_SHA matches the checked out commit hash
- drive-by ensure that workflow gets triggered on changes to itself

---------

Signed-off-by: Paul Balaji <10051819+paulbalaji@users.noreply.github.com>
  • Loading branch information
paulbalaji authored Jun 25, 2024
1 parent d213e32 commit b99920e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/monorepo-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'typescript/infra/**'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/monorepo-docker.yml'

concurrency:
group: build-push-monorepo-${{ github.ref }}
Expand Down Expand Up @@ -47,7 +48,7 @@ jobs:
id: taggen
run: |
echo "TAG_DATE=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
echo "TAG_SHA=$(echo '${{ github.sha }}' | cut -b 1-7)" >> $GITHUB_OUTPUT
echo "TAG_SHA=$(echo '${{ github.event.pull_request.head.sha || github.sha }}' | cut -b 1-7)" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/rust-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
paths:
- 'rust/**'
- '.github/workflows/rust-docker.yml'
concurrency:
group: build-push-agents-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
id: taggen
run: |
echo "TAG_DATE=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
echo "TAG_SHA=$(echo '${{ github.sha }}' | cut -b 1-7)" >> $GITHUB_OUTPUT
echo "TAG_SHA=$(echo '${{ github.event.pull_request.head.sha || github.sha }}' | cut -b 1-7)" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand Down

0 comments on commit b99920e

Please sign in to comment.