Extends controller-runtime with new metric #890
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: {} | |
workflow_dispatch: {} | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Lint | |
run: make lint | |
unit-test: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Run unit tests | |
run: make test | |
build-image: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image | |
run: make docker-build | |
- name: Export images | |
run: tar -czvf images.tar.gz *-image.tar | |
- name: Archive image | |
uses: actions/[email protected] | |
with: | |
name: images | |
path: images.tar.gz | |
test-image: | |
runs-on: ubuntu-22.04 | |
needs: [unit-test, build-image] | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install regctl | |
uses: regclient/actions/regctl-installer@main | |
- name: Download archived image | |
uses: actions/[email protected] | |
with: | |
name: images | |
path: . | |
- name: Load archived images | |
run: | | |
tar xvf images.tar.gz | |
make load-images | |
- name: Test image | |
run: | | |
docker tag ghcr.io/spiffe/spire-controller-manager:devel ghcr.io/spiffe/spire-controller-manager:nightly | |
(cd demo; ./test.sh) | |
success: | |
runs-on: ubuntu-22.04 | |
needs: [lint, unit-test, build-image, test-image] | |
steps: | |
- name: Shout it out | |
run: echo SUCCESS |