From af27ea080f7fab0b1da8f1d24aa09511d1a3659d Mon Sep 17 00:00:00 2001 From: duhow Date: Fri, 23 Aug 2024 11:46:29 +0200 Subject: [PATCH] add GitHub Actions Workflow --- .github/workflows/docker.yaml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/docker.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 00000000..c43cca71 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,49 @@ +name: Docker + +on: + push: + branches: [master] + tags: + - 'v**' + +jobs: + build: + runs-on: ubuntu-latest + name: Build + permissions: + contents: read + id-token: write + packages: write + steps: + - uses: actions/checkout@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository }} + tags: | + type=sha + type=ref,event=tag + type=semver,pattern={{version}} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}