Skip to content

Commit

Permalink
refactor(build.yml): remove tag creation step and replace it with a s…
Browse files Browse the repository at this point in the history
…emantic versioning pattern

feat(build.yml): add support for latest tag to be enabled only on main branch builds
  • Loading branch information
masterkain committed May 19, 2023
1 parent 7b895eb commit 784fde5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Create tag
id: tag
run: |
TIMESTAMP=$(date +%s)
echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
Expand All @@ -32,7 +26,8 @@ jobs:
org.opencontainers.image.vendor=iCoreTech, Inc.
org.opencontainers.image.licenses=MIT
tags: |
type=raw,value={{branch}}-{{sha}}-${{ steps.tag.outputs.timestamp }}
type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
Expand Down

0 comments on commit 784fde5

Please sign in to comment.