diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b70129..ab309b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,9 @@ jobs: - uses: docker/metadata-action@v4 id: meta with: - images: ${{ github.repository_owner }}/emqx-exporter + images: | + ${{ github.repository_owner }}/emqx-exporter + ghcr.io/${{ github.repository }} tags: | type=ref,event=branch type=ref,event=pr @@ -23,10 +25,14 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - uses: docker/login-action@v2 - if: startsWith(github.ref, 'refs/tags/') with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} + - uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} - uses: docker/build-push-action@v3 with: platforms: linux/amd64,linux/arm64,linux/arm/v7