From 80ec851b69033d23e9398fbe9a701dcd04d50a6f Mon Sep 17 00:00:00 2001 From: Up Date: Sat, 10 Aug 2024 07:44:04 +0200 Subject: [PATCH] add GitHub actions workflow --- .github/workflows/ghcr.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/ghcr.yml diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml new file mode 100644 index 0000000..228d776 --- /dev/null +++ b/.github/workflows/ghcr.yml @@ -0,0 +1,33 @@ +name: Build & Publish (main) +on: + push: + branches: [ main ] + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log into container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + - name: Build Docker image + uses: docker/build-push-action@v6 + with: + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}