From e6cd67ca91b5f2c0102143bd8974adcbdc096b10 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Thu, 26 Oct 2023 13:46:20 +0200 Subject: [PATCH] ci: add workflow to publish on ghcr on new tag --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..5ad7d9a --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }}