This commit is contained in:
2023-06-06 01:02:13 +02:00
parent 40994db39d
commit 08e7a049b4
23 changed files with 1890 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
name: Build docker image
on:
push:
branches:
- 'main'
jobs:
Build-Docker-Image:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- id: repository_name
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository }}
-
name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v4
env:
IMAGE: ${{ steps.repository_name.outputs.lowercase }}
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ env.IMAGE }}:latest
context: .
file: ./docker/production.dockerfile
-
name: Invoke deployment hook
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL }}
-
name: Invoke deployment hook
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL2 }}