Skip to content

Commit

Permalink
Update docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerPodacter committed Dec 12, 2024
1 parent 4ede54e commit 61a6f20
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [ "v*", "main" ]
tags:
- 'v*'
release:
types: [published]
pull_request:
branches: [ "v*", "main" ]

Expand All @@ -31,9 +33,25 @@ jobs:
with:
images: ghcr.io/0xfacet/facet-node
tags: |
type=ref,event=branch # Creates tags for branches (v1.0.0, main)
type=sha,format=short # Creates short SHA tags
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} # Only tag latest from main branch
# Latest commit SHA
type=sha,format=short
# Branch names (v1.0.0, main, etc)
type=ref,event=branch
# Git tags (v1.0.0, etc)
type=ref,event=tag
# Semantic versioning for releases
type=semver,pattern={{version}},event=tag
type=semver,pattern={{major}}.{{minor}},event=tag
type=semver,pattern={{major}},event=tag
# Latest release tag
type=raw,value=latest-release,enable=${{ github.event_name == 'release' }}
# Latest on main branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
Expand Down

0 comments on commit 61a6f20

Please sign in to comment.