atlantis-image: yaml fix using a separate env var (#2725)

* atlantis-image: yaml fix using a separate env var

* Update atlantis-image.yml

* Update atlantis-image.yml

* Update atlantis-image.yml

* Update atlantis-image.yml

* Update atlantis-image.yml

* Update atlantis-image.yml
This commit is contained in:
nitrocode
2022-11-25 21:57:16 -06:00
committed by GitHub
parent a0c7dd8d98
commit e2b4ec444b

View File

@@ -20,6 +20,9 @@ concurrency:
jobs:
build:
runs-on: ubuntu-22.04
env:
RELEASE_TYPE: ${{ contains(github.ref, 'pre') && 'pre' || 'stable' }}
RELEASE_TAG: ${{ contains(github.ref, 'pre') && 'prerelease-latest' || 'latest' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
@@ -61,7 +64,7 @@ jobs:
startsWith(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: "Build and push atlantis:${{ env.RELEASE_VERSION }} image for ${{ contains(github.ref, 'pre') ? 'pre' : 'stable' }} release"
- name: "Build and push atlantis:${{ env.RELEASE_VERSION }} image for ${{ env.RELEASE_TYPE }} release"
if: |
contains(fromJson('["push", "pull_request"]'), github.event_name) &&
startsWith(github.ref, 'refs/tags/')
@@ -73,4 +76,4 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository_owner }}/atlantis:${{ contains(github.ref, 'pre') ? "prerelease-latest" : "latest") }}
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_TAG }}