Update The Greatest Generation Metadata - Thu Dec 21 21:26:52 UTC 2023 #366
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
# Name: build-and-release.yaml | |
# Author: Mathew Fleisch <[email protected]> | |
# Description: This action will build and push a docker container, when triggered by | |
# pushing to the main branch | |
name: Release Container and Helm Chart | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release Containers and Helm Chart | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set tag environment variable | |
run: echo "RELEASE_VERSION=$(make version)" >> $GITHUB_ENV | |
- | |
name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build and Push Containers | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ghcr.io/${{ secrets.REPO_OWNER }}/agimus:latest | |
ghcr.io/${{ secrets.REPO_OWNER }}/agimus:${{ env.RELEASE_VERSION }} | |
cache-from: type=registry,ref=ghcr.io/${{ secrets.REPO_OWNER }}/agimus:latest | |
cache-to: type=inline | |
- | |
name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- | |
name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GIT_TOKEN }}" |