Skip to content

Commit

Permalink
Stop using an environment variable to store platforms
Browse files Browse the repository at this point in the history
Instead of using the CSV style in an environment variable we can
instead use a newline delimited list directly for the `platforms`
input. Since the environment variable is only used to provide a value
for the `platforms` input there should be no issue with this change.
  • Loading branch information
mcdonnnj committed Jan 6, 2025
1 parent 0d48ebd commit bb998dd
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ env:
BUILDX_CACHE_DIR: ~/.cache/buildx
IMAGE_NAME: cisagov/example
PIP_CACHE_DIR: ~/.cache/pip
PLATFORMS: "linux/amd64,linux/arm/v6,linux/arm/v7,\
linux/arm64,linux/ppc64le,linux/s390x"
PRE_COMMIT_CACHE_DIR: ~/.cache/pre-commit
RUN_TMATE: ${{ secrets.RUN_TMATE }}
TERRAFORM_DOCS_REPO_BRANCH_NAME: improvement/support_atx_closed_markdown_headers
Expand Down Expand Up @@ -452,12 +450,12 @@ jobs:
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE
build-push-all:
# Builds the final set of images for each of the platforms listed in
# PLATFORMS environment variable. These images are tagged with the Docker
# tags calculated in the "prepare" job and pushed to Docker Hub and the
# GitHub Container Registry. The contents of README.md are pushed as the
# image's description to Docker Hub. This job is skipped when the
# triggering event is a pull request.
# Builds the final set of images for each of the platforms specified in the
# "platforms" input for the docker/build-push-action Action. These images
# are tagged with the Docker tags calculated in the "prepare" job and
# pushed to Docker Hub and the GitHub Container Registry. The contents of
# README.md are pushed as the image's description to Docker Hub. This job
# is skipped when the triggering event is a pull request.
if: github.event_name != 'pull_request'
name: Build and push all platforms
needs:
Expand Down Expand Up @@ -541,7 +539,13 @@ jobs:
org.opencontainers.image.version=${{
needs.prepare.outputs.source_version }}"
platforms: ${{ env.PLATFORMS }}
platforms: |
linux/amd64
linux/arm/v6
linux/arm/v7
linux/arm64
linux/ppc64le
linux/s390x
# Uncomment the following option if you are building an image for use
# on Google Cloud Run or AWS Lambda. The current default image output
# is unable to run on either. Please see the following issue for more
Expand Down

0 comments on commit bb998dd

Please sign in to comment.