-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "refactor(atlantis-image): recombine with atlantis-base (#3001)"
This reverts commit 310aff8.
- Loading branch information
Showing
6 changed files
with
294 additions
and
176 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: atlantis-base | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'docker-base/Dockerfile.*' | ||
- '.github/workflows/atlantis-base.yml' | ||
branches: | ||
- "main" | ||
pull_request: | ||
paths: | ||
- 'docker-base/Dockerfile.*' | ||
- '.github/workflows/atlantis-base.yml' | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
working-directory: docker-base | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
image_type: [alpine, debian] | ||
runs-on: ubuntu-22.04 | ||
env: | ||
DOCKERFILE: "Dockerfile.${{ matrix.image_type }}" | ||
IMAGE_BASE: ghcr.io/${{ github.repository_owner }}/atlantis-base | ||
IMAGE_SUFFIX: ${{ matrix.image_type != 'alpine' && format('-{0}', matrix.image_type) || '' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: arm64,arm | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
# related issues for pinning buildkit | ||
# https://github.com/docker/build-push-action/issues/761 | ||
# https://github.com/containerd/containerd/issues/7972 | ||
# https://github.com/containerd/containerd/pull/6995 | ||
with: | ||
driver-opts: | | ||
image=moby/buildkit:v0.10.6 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
atlantis | ||
labels: | | ||
org.opencontainers.image.licenses=Apache-2.0 | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- name: Login to Packages Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Populate release version | ||
run: echo "RELEASE_VERSION=$(date +"%Y.%m.%d")" >> $GITHUB_ENV | ||
|
||
- name: Build and push atlantis-base:${{ env.RELEASE_VERSION }}${{ env.IMAGE_SUFFIX }} image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
context: docker-base | ||
build-args: ATLANTIS_BASE_TAG_TYPE=${{ matrix.image_type }} | ||
file: docker-base/${{ env.DOCKERFILE }} | ||
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
# release version is the YYYYMMDD date of the build i.e. 20301210 | ||
# release version also has the image type appended i.e. 20301210-alpine | ||
# release tag is latest i.e. latest | ||
# release tag also has the image type appended i.e. latest-alpine | ||
# if it's Dec 10, 2030 and alpine, it will do 20301210, 20301210-alpine, latest, latest-alpine | ||
# if it's Dec 10, 2030 and debian, it will do 20301210-debian, latest-debian | ||
tags: | | ||
${{ env.IMAGE_BASE }}:${{ env.RELEASE_VERSION }}${{ env.IMAGE_SUFFIX }} | ||
${{ env.IMAGE_BASE }}:${{ env.RELEASE_VERSION }}-${{ matrix.image_type }} | ||
${{ env.IMAGE_BASE }}:latest${{ env.IMAGE_SUFFIX }} | ||
${{ env.IMAGE_BASE }}:latest-${{ matrix.image_type }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
FROM ghcr.io/runatlantis/atlantis:latest | ||
COPY atlantis /usr/local/bin/atlantis | ||
# TODO: remove this once we get this in the base image | ||
# renovate: datasource=github-releases depName=open-policy-agent/conftest | ||
ENV DEFAULT_CONFTEST_VERSION=0.40.0 | ||
|
||
WORKDIR /atlantis/src |
Oops, something went wrong.