mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-03-21 17:44:49 -05:00
commit
f0476eba58
15
.github/workflows/docker.yml
vendored
15
.github/workflows/docker.yml
vendored
|
|
@ -8,8 +8,9 @@ on:
|
|||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
DEFAULT_BRANCH: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
|
||||
SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }}
|
||||
RELEASE_BRANCH: refs/heads/master
|
||||
SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }}
|
||||
SHOULD_DOWNLOAD_IP2LOCATION_DB: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
|
||||
jobs:
|
||||
build-publish-amd64:
|
||||
|
|
@ -41,7 +42,7 @@ jobs:
|
|||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ github.ref == env.DEFAULT_BRANCH }}
|
||||
type=raw,value=latest,enable=${{ github.ref == env.RELEASE_BRANCH }}
|
||||
type=raw,value=edge,enable=${{ github.ref == 'refs/heads/dev' }}
|
||||
type=sha
|
||||
|
||||
|
|
@ -53,8 +54,7 @@ jobs:
|
|||
push: ${{ env.SHOULD_PUSH_IMAGE }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
secrets: |
|
||||
"ip2location-token=${{ secrets.IP2LOCATION_TOKEN }}"
|
||||
secrets: ip2location-token=${{ env.SHOULD_DOWNLOAD_IP2LOCATION_DB == 'true' && secrets.IP2LOCATION_TOKEN || '' }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ jobs:
|
|||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest-arm,enable=${{ github.ref == env.DEFAULT_BRANCH }}
|
||||
type=raw,value=latest-arm,enable=${{ github.ref == env.RELEASE_BRANCH }}
|
||||
type=raw,value=edge-arm,enable=${{ github.ref == 'refs/heads/dev' }}
|
||||
type=sha,suffix=-arm
|
||||
|
||||
|
|
@ -99,7 +99,6 @@ jobs:
|
|||
push: ${{ env.SHOULD_PUSH_IMAGE }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
secrets: |
|
||||
"ip2location-token=${{ secrets.IP2LOCATION_TOKEN }}"
|
||||
secrets: ip2location-token=${{ env.SHOULD_DOWNLOAD_IP2LOCATION_DB == 'true' && secrets.IP2LOCATION_TOKEN || '' }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user