Skip to content

Commit

Permalink
var image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogamboagap committed Nov 19, 2024
1 parent 996e315 commit a863345
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/on-pullrequest-dockerfile-ac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
IMAGE_NAME: ${{ vars.IMAGE_NAME }}
IMAGE_TAG: ${{ github.ref_name }}

permissions: read-all

Expand All @@ -39,6 +38,15 @@
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set IMAGE_TAG
id: set-image-tag
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "IMAGE_TAG=${{ github.base_ref }}" >> $GITHUB_ENV
else
echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
fi
- name: Copy application folder to docker context
if: ${{ matrix.dockerfile.type == 'local' }}
run: |
Expand Down

0 comments on commit a863345

Please # to comment.