-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update platform and rename/tidy github action files
- Loading branch information
Showing
8 changed files
with
125 additions
and
48 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This action pre-builds the dev-base image and pushes it to the GitHub Container Registry (GHCR) | ||
|
||
name: Publish outpost image to github container registry | ||
|
||
on: | ||
push: | ||
branches: [develop, staging, production] | ||
|
||
jobs: | ||
push-outpost-image: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
platforms: ["linux/amd64", "linux/arm64", "linux/arm64/v8"] | ||
steps: | ||
- name: "Checkout GitHub Action" | ||
uses: actions/checkout@main | ||
|
||
- name: "Login to GitHub Container Registry" | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{github.actor}} | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Set Docker Image Tag | ||
id: vars | ||
run: | | ||
BRANCH_NAME=${GITHUB_REF#refs/heads/} | ||
if [[ "$BRANCH_NAME" == "develop" ]]; then | ||
echo "tag=development" >> $GITHUB_ENV | ||
elif [[ "$BRANCH_NAME" == "staging" ]]; then | ||
echo "tag=staging" >> $GITHUB_ENV | ||
elif [[ "$BRANCH_NAME" == "production" ]]; then | ||
echo "tag=latest" >> $GITHUB_ENV | ||
else | ||
echo "tag=default" >> $GITHUB_ENV | ||
fi | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build and push outpost docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
tags: ghcr.io/wearefuturegov/outpost:${{ env.tag }} | ||
file: Dockerfile.production | ||
platforms: ${{ matrix.platforms }} | ||
push: true | ||
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Outpost image | ||
labels: org.opencontainers.image.source=https://github.com/wearefuturegov/outpost |
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,44 @@ | ||
# This action tests to make sure that the docker image can be built successfully on the specified platforms | ||
|
||
name: Test outpost image docker build | ||
|
||
on: push | ||
|
||
jobs: | ||
test-docker-build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
platforms: ["linux/amd64", "linux/arm64", "linux/arm64/v8"] | ||
steps: | ||
- name: "Checkout GitHub Action" | ||
uses: actions/checkout@main | ||
|
||
- name: Set Docker Image Tag | ||
id: vars | ||
run: | | ||
BRANCH_NAME=${GITHUB_HEAD_REF#refs/heads/} | ||
if [[ "$BRANCH_NAME" == "develop" ]]; then | ||
echo "tag=development" >> $GITHUB_ENV | ||
elif [[ "$BRANCH_NAME" == "staging" ]]; then | ||
echo "tag=staging" >> $GITHUB_ENV | ||
elif [[ "$BRANCH_NAME" == "production" ]]; then | ||
echo "tag=latest" >> $GITHUB_ENV | ||
else | ||
echo "tag=default" >> $GITHUB_ENV | ||
fi | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
tags: outpost:${{ env.tag }} | ||
file: Dockerfile.production | ||
platforms: ${{ matrix.platforms }} | ||
push: false |
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