Skip to content

Commit

Permalink
fix: matrix build recorrect and use docker build and push action on v…
Browse files Browse the repository at this point in the history
…5.0.0 (#4718)

Signed-off-by: hungran <[email protected]>
  • Loading branch information
hungran authored Dec 14, 2023
1 parent 31137ec commit 2035225
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 58 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/build_tool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ jobs:
- piped-base
- piped-base-okd
- firestore-emulator
include:
- image: actions-gh-release
context: tool/actions-gh-release
- image: actions-plan-preview
context: tool/actions-plan-preview
- image: codegen
context: tool/codegen
- image: piped-base
context: tool/piped-base
- image: piped-base-okd
context: tool/piped-base-okd
- image: firestore-emulator
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -44,5 +32,5 @@ jobs:
- name: Build ${{ matrix.image }} image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0
with:
context: ${{ matrix.context }}
context: tool/${{ matrix.image }}
tags: ${{ env.REGISTRY }}/pipe-cd/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
17 changes: 12 additions & 5 deletions .github/workflows/publish_image_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
packages: write
strategy:
matrix:
container_registry:
- ghcr.io
- gcr.io
image:
- helloworld
- launcher
Expand All @@ -30,26 +33,30 @@ jobs:
- piped
- piped-okd
- pipectl
container_registry:
- ghcr.io
include:
- image: helloworld
dockerfile: cmd/helloworld/Dockerfile
container_registry: gcr.io
- image: launcher
dockerfile: cmd/launcher/Dockerfile
container_registry: gcr.io
- image: launcher-okd
dockerfile: cmd/launcher/Dockerfile-okd
- image: pipecd
dockerfile: cmd/pipecd/Dockerfile
container_registry: gcr.io
- image: piped
dockerfile: cmd/piped/Dockerfile
- image: piped-okd
dockerfile: cmd/piped/Dockerfile-okd
- image: pipectl
dockerfile: cmd/pipectl/Dockerfile
exclude:
- image: launcher-okd
container_registry: gcr.io
- image: piped
container_registry: gcr.io
- image: piped-okd
container_registry: gcr.io
- image: pipectl
container_registry: gcr.io

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push site image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0
with:
push: true
context: docs
Expand Down
52 changes: 13 additions & 39 deletions .github/workflows/publish_tool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ jobs:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
image:
- actions-gh-release
- actions-plan-preview
- codegen
- piped-base
- piped-base-okd
- firestore-emulator
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -31,44 +40,9 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

# Building and pushing container images.
- name: Build and push actions-gh-release image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
- name: Build and push ${{ matrix.image }} image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0
with:
context: tool/actions-gh-release
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.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.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.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.GHCR }}/pipe-cd/piped-base-okd:${{ env.PIPECD_VERSION }}
push: true

- name: Build and push firestore-emulator image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: tool/firestore-emulator
tags: ${{ env.GHCR }}/pipe-cd/firestore-emulator:${{ env.PIPECD_VERSION }}
context: tool/${{ matrix.image }}
tags: ${{ env.GHCR }}/pipe-cd/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
push: true

0 comments on commit 2035225

Please sign in to comment.