ci(docker): always push image (#1812)
This commit is contained in:
12
.github/workflows/deployment-docker-image.yml
vendored
12
.github/workflows/deployment-docker-image.yml
vendored
@@ -13,11 +13,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
description: Send notifications
|
description: Send notifications
|
||||||
push-image:
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
description: Push Docker Image
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -112,7 +107,6 @@ jobs:
|
|||||||
NEXT_VERSION: ${{ needs.release.outputs.version }}
|
NEXT_VERSION: ${{ needs.release.outputs.version }}
|
||||||
DEPLOY_LATEST: ${{ github.ref_name == 'main' }}
|
DEPLOY_LATEST: ${{ github.ref_name == 'main' }}
|
||||||
DEPLOY_BETA: ${{ github.ref_name == 'beta' }}
|
DEPLOY_BETA: ${{ github.ref_name == 'beta' }}
|
||||||
PUSH_IMAGE: ${{ github.event_name != 'workflow_dispatch' || github.events.inputs.push-image == true }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -143,13 +137,13 @@ jobs:
|
|||||||
${{ env.DEPLOY_LATEST == 'true' && 'type=raw,value=latest' || null }}
|
${{ env.DEPLOY_LATEST == 'true' && 'type=raw,value=latest' || null }}
|
||||||
${{ env.DEPLOY_BETA == 'true' && 'type=raw,value=beta' || null }}
|
${{ env.DEPLOY_BETA == 'true' && 'type=raw,value=beta' || null }}
|
||||||
type=raw,value=${{ env.NEXT_VERSION }}
|
type=raw,value=${{ env.NEXT_VERSION }}
|
||||||
- name: Build and maybe push
|
- name: Build and push
|
||||||
id: buildPushAction
|
id: buildPushAction
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
context: .
|
context: .
|
||||||
push: ${{ env.PUSH_IMAGE }}
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
network: host
|
network: host
|
||||||
@@ -160,4 +154,4 @@ jobs:
|
|||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
uses: Ilshidur/action-discord@master
|
uses: Ilshidur/action-discord@master
|
||||||
with:
|
with:
|
||||||
args: "Deployment of image has completed for branch ${{ github.ref_name }}. Image ID is '${{ steps.buildPushAction.outputs.imageid }}'. ${{ env.PUSH_IMAGE == 'true' && '' || 'This was a dry run' }}"
|
args: "Deployment of image has completed for branch ${{ github.ref_name }}. Image ID is '${{ steps.buildPushAction.outputs.imageid }}'."
|
||||||
|
|||||||
Reference in New Issue
Block a user