diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index d8fde45..46a0731 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -8,7 +8,14 @@ on: jobs: docker: + name: Build and push Docker images to multiple registries + if: github.repository_owner == 'multipath-tcp' runs-on: ubuntu-latest + permissions: + packages: write + contents: read + attestations: write + id-token: write steps: - name: Set up QEMU @@ -22,12 +29,21 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push id: docker_build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: platforms: linux/amd64,linux/arm64 push: true - tags: mptcp/mptcp-upstream-virtme-docker:${{ github.ref_name }} + tags: | + mptcp/mptcp-upstream-virtme-docker:${{ github.ref_name }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }}