Skip to content

Commit

Permalink
👷 ci: add sha tag to build image
Browse files Browse the repository at this point in the history
  • Loading branch information
megasanjay committed Nov 14, 2023
1 parent 7bd08a1 commit 27e5ee2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ jobs:
username: ${{ secrets.AZURE_REGISTRY_USERNAME }}
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}

- name: Get GitHub short SHA
id: git_sha
run: echo ::set-output name=sha::$(git rev-parse --short ${{ github.sha }})

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}/fairhub:staging
tags: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}/fairhub:staging,${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}/fairhub:{${{ steps.git_sha.outputs.sha }}

0 comments on commit 27e5ee2

Please sign in to comment.