From 700269e0bd835ad0204dcd863b2875ab280215bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Lino?= Date: Mon, 12 Aug 2024 11:37:52 -0300 Subject: [PATCH] chore: docker hub (#70) --- .github/workflows/ci.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 37b1697..dc96f02 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,10 +1,9 @@ name: CI -on: [push] - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} +on: + push: + tags: + - '*' jobs: build: @@ -15,15 +14,14 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v2.1.0 with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4.3.0 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ github.repository }} - name: Build and push Docker image uses: docker/build-push-action@v4.0.0 @@ -32,4 +30,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} -