Merge pull request #282 from kubernetes-sigs/dependabot/go_modules/al… #179
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: e2e | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup golang | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: '1.21' | |
check-latest: true | |
- name: Restore cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: go-${{ hashFiles('**/go.sum') }} | |
restore-keys: go- | |
- name: Run local registry | |
run: podman run -d -p 5000:5000 registry:2 | |
- name: Build test image | |
uses: redhat-actions/buildah-build@b4dc19b4ba891854660ab1f88a097d45aa158f76 # v2.12 | |
id: test-image | |
with: | |
base-image: scratch | |
image: test | |
oci: true | |
- name: Push test image to local registry | |
uses: redhat-actions/push-to-registry@9986a6552bc4571882a4a67e016b17361412b4df # v2.7.1 | |
with: | |
image: ${{ steps.test-image.outputs.image }} | |
registry: localhost:5000 | |
tls-verify: false | |
- name: Run e2e tests | |
run: go run mage.go E2ETest |