build: docker fixes (#3378)

* build: shorten tags on docker push

* build: only deploy on commits to master
This commit is contained in:
Connor Tumbleson 2023-10-16 06:58:05 -04:00 committed by GitHub
parent 34a6970852
commit 03fa70bd2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -1,9 +1,9 @@
name: Build and push docker (beta) name: Build and push docker (beta)
on: on:
pull_request: push:
branches: [master] branches:
types: [closed] - master
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
@ -43,5 +43,4 @@ jobs:
push: true push: true
tags: | tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APKTOOL_HASH }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APKTOOL_HASH }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:beta ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:snapshot
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master

View File

@ -44,7 +44,5 @@ jobs:
file: ./docker/Dockerfile file: ./docker/Dockerfile
push: true push: true
tags: | tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APKTOOL_HASH }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APKTOOL_TAG }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APKTOOL_TAG }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:prod
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest