Skip to content

Commit

Permalink
Update gha to be able to automatically push images with release tags (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
magdyksaleh authored Nov 22, 2023
1 parent 2627fed commit 00675dc
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set output
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/predibase/lorax
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=,suffix=,format=short
type=raw,value=latest
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
Expand All @@ -48,6 +56,5 @@ jobs:
context: .
file: ./Dockerfile # Path to your Dockerfile
push: true
tags: |
ghcr.io/predibase/lorax:${{ steps.vars.outputs.sha_short }}
ghcr.io/predibase/lorax:latest
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 00675dc

Please sign in to comment.