Skip to content

Commit

Permalink
chore: add app version to image tags
Browse files Browse the repository at this point in the history
  • Loading branch information
victoralvesf authored Oct 1, 2024
1 parent 5bc2937 commit 7e1b4f9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,25 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Get version from package.json
id: app_version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Docker metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=${{ steps.app_version.outputs.version }}
type=raw,value=${{ github.sha }}
- name: Set up QEMU
Expand Down

0 comments on commit 7e1b4f9

Please sign in to comment.