walk kustomize files #192
Workflow file for this run
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: pr_build | |
on: | |
pull_request: | |
paths: | |
- '*' | |
- '*/**' | |
- '!README.md' | |
- '!COPYING.LGPL-3' | |
- '!.gitattributes' | |
- '!.gitignore' | |
env: | |
FS_IMAGE: ttl.sh/${{ github.repository }}/pr-${{ github.event.pull_request.number }}/${{ github.event.pull_request.head.sha }} | |
FS_TAG: 24h | |
# TODO: Move this to repo config | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
packages: write | |
pull-requests: write | |
strategy: | |
matrix: | |
platform: | |
- linux/amd64 | |
# - linux/arm64 | |
steps: | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: all | |
if: matrix.platform == 'linux/arm64' | |
- uses: actions/checkout@v3 | |
- name: extract git sha | |
run: echo "GIT_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
# Reads in .tools-versions and spits out env variables | |
- uses: wistia/[email protected] | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: earthly/actions-setup@v1 | |
with: { version: "v${{ env.EARTHLY_TOOL_VERSION }}" } | |
- run: | | |
earthly \ | |
--push \ | |
--platform ${{ matrix.platform }} \ | |
+docker-tag \ | |
--GIT_COMMIT=${{ env.GIT_SHA_SHORT }} \ | |
--GIT_TAG=${{ env.FS_TAG }} \ | |
--GOLANG_VERSION=${{ env.GOLANG_TOOL_VERSION }} \ | |
--CI_REGISTRY_IMAGE=${{ env.FS_IMAGE }} | |
- uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
Temporary image available at `${{ env.FS_IMAGE }}:${{ env.FS_TAG }}` for 24 hours. If you need another built, close and reopen the PR. |