standarize images location #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: buildx-images | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths: | |
- "cmd/images/**" | |
- ".github/workflows/image-builder.yml" | |
push: | |
branches: | |
- main | |
paths: | |
- "cmd/images/**" | |
- ".github/workflows/image-builder.yml" | |
workflow_dispatch: {} | |
jobs: | |
# Build the base Alpine image | |
build-alpine: | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: alpine | |
dockerfile: cmd/images/alpine/Dockerfile | |
context: . | |
unpack-alpine: | |
runs-on: ubuntu-latest | |
needs: build-alpine | |
outputs: | |
clean_image: ${{ steps.unpack-alpine.outputs.clean_image }} | |
steps: | |
- name: Unpack image output to output variable | |
id: unpack-alpine | |
run: | | |
IMAGE="${{ needs.build-alpine.outputs.images }}" | |
CLEAN_IMAGE=$(echo "$IMAGE" | sed 's/[][]//g') | |
echo "clean_image=$CLEAN_IMAGE" >> $GITHUB_OUTPUT | |
# Build alpine/git image that depends on build-alpine | |
build-alpine-git: | |
needs: [build-alpine, unpack-alpine] | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: alpine-git | |
dockerfile: cmd/images/alpine/git/Dockerfile | |
context: . | |
build-args: BASE_ALPINE_IMAGE=${{ needs.unpack-alpine.outputs.clean_image }} | |
# Build alpine/git/gke-aws-auth image that depends on build-alpine-git | |
build-alpine-git-gke-aws-auth: | |
needs: [build-alpine, unpack-alpine] | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: alpine-git-gke-aws-auth | |
dockerfile: cmd/images/alpine/git/gke-aws-auth/Dockerfile | |
context: . | |
build-args: BASE_ALPINE_IMAGE=${{ needs.unpack-alpine.outputs.clean_image }} | |
# Build the base buildpack image | |
build-buildpack: | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: buildpack | |
dockerfile: cmd/images/buildpack/Dockerfile | |
context: . | |
unpack-buildpack: | |
runs-on: ubuntu-latest | |
needs: build-buildpack | |
outputs: | |
clean_image: ${{ steps.unpack-buildpack.outputs.clean_image }} | |
steps: | |
- name: Unpack image output to output variable | |
id: unpack-buildpack | |
run: | | |
IMAGE="${{ needs.build-buildpack.outputs.images }}" | |
CLEAN_IMAGE=$(echo "$IMAGE" | sed 's/[][]//g') | |
echo "clean_image=$CLEAN_IMAGE" >> $GITHUB_OUTPUT | |
# Build buildpack/go image that depends on build-buildpack | |
build-buildpack-go: | |
needs: [build-buildpack, unpack-buildpack] | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: buildpack-go | |
dockerfile: cmd/images/buildpack/go/Dockerfile | |
context: . | |
build-args: BASE_BUILDPACK_IMAGE=${{ needs.unpack-buildpack.outputs.clean_image }} | |
# Build unified-agent base image | |
build-unified-agent: | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: unified-agent | |
dockerfile: cmd/images/unified-agent/Dockerfile | |
context: . | |
unpack-unified-agent: | |
runs-on: ubuntu-latest | |
needs: build-unified-agent | |
outputs: | |
clean_image: ${{ steps.unpack-unified-agent.outputs.clean_image }} | |
steps: | |
- name: Unpack image output to output variable | |
id: unpack-unified-agent | |
run: | | |
IMAGE="${{ needs.build-unified-agent.outputs.images }}" | |
CLEAN_IMAGE=$(echo "$IMAGE" | sed 's/[][]//g') | |
echo "clean_image=$CLEAN_IMAGE" >> $GITHUB_OUTPUT | |
# Build unified-agent/go image that depends on build-unified-agent | |
build-unified-agent-go: | |
needs: [build-unified-agent, unpack-unified-agent] | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: unified-agent-go | |
dockerfile: cmd/images/unified-agent/go/Dockerfile | |
context: . | |
build-args: BASE_UNIFIED_AGENT_IMAGE=${{ needs.unpack-unified-agent.outputs.clean_image }} | |
# Build unified-agent/nodejs image that depends on build-unified-agent | |
build-unified-agent-nodejs: | |
needs: [build-unified-agent, unpack-unified-agent] | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: unified-agent-nodejs | |
dockerfile: cmd/images/unified-agent/nodejs/Dockerfile | |
context: . | |
build-args: BASE_UNIFIED_AGENT_IMAGE=${{ needs.unpack-unified-agent.outputs.clean_image }} | |
# Build unified-agent/python image that depends on build-unified-agent | |
build-unified-agent-python: | |
needs: [build-unified-agent, unpack-unified-agent] | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: unified-agent-python | |
dockerfile: cmd/images/unified-agent/python/Dockerfile | |
context: . | |
build-args: BASE_UNIFIED_AGENT_IMAGE=${{ needs.unpack-unified-agent.outputs.clean_image }} | |
# Build e2e-gcloud image | |
build-e2e-gcloud: | |
uses: ./.github/workflows/image-builder.yml | |
with: | |
name: e2e-gcloud | |
dockerfile: cmd/images/e2e-gcloud/Dockerfile | |
context: . |