Skip to content

Commit

Permalink
workflows(atlantis-image): fix building and publishing of Docker imag…
Browse files Browse the repository at this point in the history
…es (runatlantis#1975)

runatlantis#1943 changed the way Docker images
were built in GitHub Actions so multi-architecture Docker images now are built,
but it unfortunately included a bug which means it hasn't worked yet on any
released version of Atlantis.

The problem is the change expected environment variables to be replaced in the
regular YAML code instead of just the commands which are run.

This attempts to fix that by instead using the template language available to
access the same environment variable.
This is based on the example provided in the documentation here:
https://docs.github.com/en/actions/learn-github-actions/environment-variables.
  • Loading branch information
Tenzer authored and krrrr38 committed Dec 16, 2022
1 parent 81f07b9 commit bcd0a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ jobs:
- name: populate release version
if: ${{ github.event_name == 'release'}}
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build and push atlantis:$RELEASE_VERSION image
- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image
if: ${{ github.event_name == 'release'}}
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
tags: |
ghcr.io/runatlantis/atlantis:$RELEASE_VERSION
ghcr.io/runatlantis/atlantis:${{ env.RELEASE_VERSION }}
ghcr.io/runatlantis/atlantis:latest

0 comments on commit bcd0a32

Please sign in to comment.