feat(build): builds develop branch to latest docker tag in workflow
This commit is contained in:
parent
4936481ffc
commit
cb8718c9b8
1 changed files with 10 additions and 3 deletions
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
|
|
@ -22,14 +22,21 @@ jobs:
|
|||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set Docker tags
|
||||
id: docker_meta
|
||||
run: |
|
||||
if [[ $GITHUB_REF == refs/heads/develop ]]; then
|
||||
echo "tags=ghcr.io/pridevrinc/vrcauthproxy:latest" >> $GITHUB_OUTPUT
|
||||
elif [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
echo "tags=ghcr.io/pridevrinc/vrcauthproxy:${VERSION},ghcr.io/pridevrinc/vrcauthproxy:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
tags: |
|
||||
ghcr.io/pridevrinc/vrcauthproxy:latest
|
||||
ghcr.io/pridevrinc/vrcauthproxy:${{ github.ref }} # Push the tagged version
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Loading…
Add table
Add a link
Reference in a new issue