diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a865fe51..82efa4d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,9 @@ jobs: id: docker_meta uses: docker/metadata-action@v4 with: - images: bigthundersr/onstar2mqtt, ghcr.io/bigthundersr/onstar2mqtt + images: | + bigthundersr/onstar2mqtt + ghcr.io/bigthundersr/onstar2mqtt flavor: | latest=true tags: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e339c84a..806856d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,9 @@ jobs: id: docker_meta uses: docker/metadata-action@v4 with: - images: bigthundersr/onstar2mqtt + images: | + bigthundersr/onstar2mqtt + ghcr.io/bigthundersr/onstar2mqtt flavor: | latest=true tags: | @@ -33,6 +35,14 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Log in to the Container registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Push to DockerHub uses: docker/build-push-action@v4