diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca92562306..708df06095 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,15 +28,16 @@ jobs: - name: Compute tags id: tags run: | - DOCKER_IMAGE=public.ecr.aws/s2n/s2n-quic-qns + ECR_IMAGE=public.ecr.aws/s2n/s2n-quic-qns + GHCR_IMAGE=ghcr.io/aws/s2n-quic/s2n-quic-qns VERSION=main if [[ $GITHUB_REF == refs/tags/* ]]; then VERSION=${GITHUB_REF#refs/tags/v} fi - TAGS="${DOCKER_IMAGE}:${VERSION}" + TAGS="${ECR_IMAGE}:${VERSION},${GHCR_IMAGE}:${VERSION}" # mark the latest on release if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - TAGS="$TAGS,${DOCKER_IMAGE}:latest" + TAGS="$TAGS,${ECR_IMAGE}:latest,${GHCR_IMAGE}:latest" fi echo "tags=${TAGS}" >> $GITHUB_OUTPUT @@ -48,6 +49,14 @@ jobs: username: ${{ secrets.AWS_ACCESS_KEY_ID }} password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.1.0 + if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push image uses: docker/build-push-action@v5 with: