test gha #41
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: Verify generated code changes | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- 'release/*' | |
env: | |
MAIN_BRANCH: origin/master | |
GOARCH: amd64 | |
CGO_ENABLED: 0 | |
SETUP_GO_VERSION: '1.22.*' | |
jobs: | |
check-changes: | |
if: false | |
runs-on: test-runner-1 | |
container: ubuntu:22.04 | |
steps: | |
- name: Install tools | |
run: | | |
export TZ=Asia/Kolkata | |
export DEBIAN_FRONTEND=noninteractive | |
apt update && apt install -y --no-install-recommends curl sudo ca-certificates git-all | |
git config --global --add safe.directory '/__w/rancher/rancher' | |
- | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.SETUP_GO_VERSION }} | |
- | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- | |
name: Verify go.mod status | |
run: ./.github/scripts/check-for-go-mod-changes.sh | |
- | |
name: Install controller-gen | |
run: go install sigs.k8s.io/controller-tools/cmd/[email protected] | |
- | |
name: Verify auto-generated changes | |
run: ./.github/scripts/check-for-auto-generated-changes.sh |