Run hack/update-expected.sh #340
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: CI | |
on: | |
push: | |
tags: | |
- "*" | |
branches: | |
- "master*" | |
- "release*" | |
pull_request: | |
branches: | |
- "master*" | |
- "release*" | |
env: | |
GOPROXY: https://proxy.golang.org | |
GOPATH: ${{ github.workspace }}/go | |
permissions: | |
contents: read | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
src: ${{ steps.filter.outputs.src }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Detect changes | |
uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
src: | |
- '!.github/**' | |
build-linux-amd64: | |
needs: changes | |
if: ${{ needs.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/') }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe | |
with: | |
go-version: "1.21.6" | |
- name: Checkout full | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} -b ${GITHUB_REF#refs/tags/} ${{ env.GOPATH }}/src/k8s.io/kops | |
- name: Checkout shallow | |
uses: actions/checkout@v2 | |
if: startsWith(github.ref, 'refs/tags/') == false | |
with: | |
path: ${{ env.GOPATH }}/src/k8s.io/kops | |
- name: Make all examples test | |
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops | |
run: | | |
make all examples test | |
- name: Upload Linux binaries | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v2 | |
with: | |
name: kops-linux-amd64 | |
path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/dist/linux/amd64/* | |
if-no-files-found: error | |
retention-days: 1 | |
build-macos-amd64: | |
needs: changes | |
if: ${{ needs.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/') }} | |
runs-on: macos-latest | |
steps: | |
- name: Set up go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe | |
with: | |
go-version: "1.21.6" | |
- name: Checkout full | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} -b ${GITHUB_REF#refs/tags/} ${{ env.GOPATH }}/src/k8s.io/kops | |
- name: Checkout shallow | |
uses: actions/checkout@v2 | |
if: startsWith(github.ref, 'refs/tags/') == false | |
with: | |
path: ${{ env.GOPATH }}/src/k8s.io/kops | |
- name: Make kops examples test | |
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops | |
run: | | |
make kops examples test | |
- name: Upload kops MacOS binary | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v2 | |
with: | |
name: kops-darwin-amd64 | |
path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/dist/darwin/amd64/kops | |
if-no-files-found: error | |
retention-days: 1 | |
verify: | |
needs: changes | |
if: ${{ needs.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/') }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe | |
with: | |
go-version: "1.21.6" | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
path: ${{ env.GOPATH }}/src/k8s.io/kops | |
- name: Make quick-ci | |
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops | |
run: | | |
make quick-ci | |
release: | |
runs-on: ubuntu-20.04 | |
if: startsWith(github.ref, 'refs/tags/') | |
permissions: | |
contents: write | |
needs: | |
- build-linux-amd64 | |
- build-macos-amd64 | |
- verify | |
steps: | |
- name: Download all binary artifacts | |
uses: actions/download-artifact@v2 | |
- name: Rename kops binary artifacts | |
run: | | |
mv kops-darwin-amd64/kops kops-darwin-amd64/kops-darwin-amd64 | |
mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 | |
mv kops-linux-amd64/channels kops-linux-amd64/channels-linux-amd64 | |
mv kops-linux-amd64/protokube kops-linux-amd64/protokube-linux-amd64 | |
mv kops-linux-amd64/nodeup kops-linux-amd64/nodeup-linux-amd64 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
fail_on_unmatched_files: true | |
files: | | |
kops-darwin-amd64/kops-darwin-amd64 | |
kops-linux-amd64/kops-linux-amd64 | |
kops-linux-amd64/channels-linux-amd64 | |
kops-linux-amd64/protokube-linux-amd64 | |
kops-linux-amd64/nodeup-linux-amd64 |