diff --git a/.github/workflows/publish_image_chart.yaml b/.github/workflows/publish_image_chart.yaml index cf387fd58d..53f8fac8eb 100644 --- a/.github/workflows/publish_image_chart.yaml +++ b/.github/workflows/publish_image_chart.yaml @@ -8,7 +8,7 @@ on: - 'v*' env: - REGISTRY: ghcr.io + GHCR: ghcr.io GCR: gcr.io HELM_VERSION: 3.8.2 GO_VERSION: 1.17.6 @@ -57,7 +57,7 @@ jobs: - name: Log in to the container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GHCR }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -75,7 +75,7 @@ jobs: push: true context: . file: cmd/pipecd/Dockerfile - tags: ${{ env.REGISTRY }}/pipe-cd/pipecd:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/pipecd:${{ env.PIPECD_VERSION }} - name: Build and push piped image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: @@ -91,7 +91,7 @@ jobs: push: true context: . file: cmd/piped/Dockerfile-okd - tags: ${{ env.REGISTRY }}/pipe-cd/piped-okd:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/piped-okd:${{ env.PIPECD_VERSION }} - name: Build and push launcher image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: @@ -107,21 +107,23 @@ jobs: push: true context: . file: cmd/launcher/Dockerfile-okd - tags: ${{ env.REGISTRY }}/pipe-cd/launcher-okd:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/launcher-okd:${{ env.PIPECD_VERSION }} - name: Build and push pipectl image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: push: true context: . file: cmd/pipectl/Dockerfile - tags: ${{ env.REGISTRY }}/pipe-cd/pipectl:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/pipectl:${{ env.PIPECD_VERSION }} - name: Build and push helloworld image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: push: true context: . file: cmd/helloworld/Dockerfile - tags: ${{ env.REGISTRY }}/pipe-cd/helloworld:${{ env.PIPECD_VERSION }} + tags: | + ${{ env.GHCR }}/pipe-cd/helloworld:${{ env.PIPECD_VERSION }} + ${{ env.GCR }}/pipecd/helloworld:${{ env.PIPECD_VERSION }} # Building and pushing Helm charts. - name: Install helm @@ -130,13 +132,13 @@ jobs: version: ${{ env.HELM_VERSION }} - name: Login to OCI using Helm run: | - echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.REGISTRY }} --username ${{ github.repository_owner }} --password-stdin + echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.GHCR }} --username ${{ github.repository_owner }} --password-stdin - name: Publish helm charts run: | make build/chart VERSION=${{ env.PIPECD_VERSION }} - helm push .artifacts/pipecd-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart - helm push .artifacts/piped-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart - helm push .artifacts/helloworld-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart + helm push .artifacts/pipecd-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart + helm push .artifacts/piped-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart + helm push .artifacts/helloworld-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart # Notify PipeCD to trigger deployment via EventWatcher. - uses: pipe-cd/actions-event-register@v1 diff --git a/.github/workflows/publish_site.yaml b/.github/workflows/publish_site.yaml index 172813dc4d..7429e895f1 100644 --- a/.github/workflows/publish_site.yaml +++ b/.github/workflows/publish_site.yaml @@ -8,7 +8,7 @@ on: - 'v*' env: - REGISTRY: ghcr.io + GHCR: ghcr.io HELM_VERSION: 3.8.2 jobs: @@ -45,7 +45,7 @@ jobs: - name: Log in to the container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GHCR }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push site image @@ -54,7 +54,7 @@ jobs: push: true context: docs file: docs/Dockerfile - tags: ${{ env.REGISTRY }}/pipe-cd/site:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/site:${{ env.PIPECD_VERSION }} # Building and pushing Helm charts. - name: Install helm @@ -63,8 +63,8 @@ jobs: version: ${{ env.HELM_VERSION }} - name: Login to OCI using Helm run: | - echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.REGISTRY }} --username ${{ github.repository_owner }} --password-stdin + echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.GHCR }} --username ${{ github.repository_owner }} --password-stdin - name: Publish site chart run: | make build/chart MOD=site VERSION=${{ env.PIPECD_VERSION }} - helm push .artifacts/site-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.REGISTRY }}/pipe-cd/chart + helm push .artifacts/site-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart diff --git a/.github/workflows/publish_tool.yaml b/.github/workflows/publish_tool.yaml index 488f3efd0b..ead17c5aa1 100644 --- a/.github/workflows/publish_tool.yaml +++ b/.github/workflows/publish_tool.yaml @@ -8,7 +8,7 @@ on: - 'v*' env: - REGISTRY: ghcr.io + GHCR: ghcr.io jobs: tool: @@ -26,7 +26,7 @@ jobs: - name: Log in to the container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GHCR }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -35,33 +35,33 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: tool/actions-gh-release - tags: ${{ env.REGISTRY }}/pipe-cd/actions-gh-release:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/actions-gh-release:${{ env.PIPECD_VERSION }} push: true - name: Build and push actions-plan-preview image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: tool/actions-plan-preview - tags: ${{ env.REGISTRY }}/pipe-cd/actions-plan-preview:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/actions-plan-preview:${{ env.PIPECD_VERSION }} push: true - name: Build and push codegen image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: tool/codegen - tags: ${{ env.REGISTRY }}/pipe-cd/codegen:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/codegen:${{ env.PIPECD_VERSION }} push: true - name: Build and push piped-base image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: tool/piped-base - tags: ${{ env.REGISTRY }}/pipe-cd/piped-base:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/piped-base:${{ env.PIPECD_VERSION }} push: true - name: Build and push piped-base-okd image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: tool/piped-base-okd - tags: ${{ env.REGISTRY }}/pipe-cd/piped-base-okd:${{ env.PIPECD_VERSION }} + tags: ${{ env.GHCR }}/pipe-cd/piped-base-okd:${{ env.PIPECD_VERSION }} push: true