From 37ef4c709999856a686d734336c43961bf8f8aa3 Mon Sep 17 00:00:00 2001 From: Lenny Consuegra Date: Tue, 2 Apr 2024 08:47:47 +0200 Subject: [PATCH] ci: add docker build workflow --- .github/workflows/ghcr.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ghcr.yaml diff --git a/.github/workflows/ghcr.yaml b/.github/workflows/ghcr.yaml new file mode 100644 index 0000000..5ad7d9a --- /dev/null +++ b/.github/workflows/ghcr.yaml @@ -0,0 +1,28 @@ +name: Build a Docker image and publish it to GHCR + +on: + push: + tags: + - '*' + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}