Skip to content

Commit

Permalink
chore: rm duplicate make test-all, no push to latest on refs with "pr…
Browse files Browse the repository at this point in the history
…e" (runatlantis#2703)

* Remove duplicate make test-all in circleci

* Prevent pushing latest tag on refs with "pre"

* DRY up atlantis-image.yaml
  • Loading branch information
nitrocode authored Nov 21, 2022
1 parent f8b1ea9 commit 065adc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ jobs:
- image: ghcr.io/runatlantis/testing-env:2022.11.17
steps:
- checkout
- run: make test-all
- run: make check-fmt
- run: make check-lint
e2e:
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,20 @@ jobs:
# Publish release to container registry
- name: populate release version
if: ${{ contains(fromJson('["push", "pull_request"]'), github.event_name) && startsWith(github.ref, 'refs/tags/') }}
if: |
contains(fromJson('["push", "pull_request"]'), github.event_name) &&
startsWith(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image for pre release
if: ${{ contains(fromJson('["push", "pull_request"]'), github.event_name) && startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-pre.') }}
- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image for ${{ contains(github.ref, 'pre') ? "pre" : "stable" }} release
if: |
contains(fromJson('["push", "pull_request"]'), github.event_name) &&
startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository_owner }}/atlantis:prerelease-latest
- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image for stable release
if: ${{ contains(fromJson('["push", "pull_request"]'), github.event_name) && startsWith(github.ref, 'refs/tags/') && (!contains(github.ref, '-pre.')) }}
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository_owner }}/atlantis:latest
ghcr.io/${{ github.repository_owner }}/atlantis:${{ contains(github.ref, 'pre') ? "prerelease-latest" : "latest") }}

0 comments on commit 065adc3

Please sign in to comment.