diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 56da5538..9071d489 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,6 +1,12 @@ name: Docker on: + workflow_dispatch: + inputs: + tag: + description: 'Docker image tag' + required: true + type: string push: branches: [main] tags: [v*] @@ -18,18 +24,20 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ secrets.DOCKERHUB_USERNAME }}/eth-faucet + images: ghcr.io/01builders/eth-faucet tags: | type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + type=raw,value=${{ inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }} - - name: Login to DockerHub + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v6