feat(build): builds develop branch to latest docker tag in workflow

This commit is contained in:
MiscFrizzy 2025-04-07 16:48:17 -04:00
parent 4936481ffc
commit cb8718c9b8

View file

@ -22,14 +22,21 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} 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 - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
push: true push: true
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64 platforms: linux/amd64
tags: | tags: ${{ steps.docker_meta.outputs.tags }}
ghcr.io/pridevrinc/vrcauthproxy:latest
ghcr.io/pridevrinc/vrcauthproxy:${{ github.ref }} # Push the tagged version
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max