Bump actions/upload-artifact from 5.0.0 to 6.0.0 #73
Workflow file for this run
This file contains hidden or 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: | |
| pull_request: | |
| branches: | |
| - "*" | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**.md' | |
| - 'images/**' # Images changes should be tested on their own workflow | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| name: changes | |
| permissions: | |
| contents: read # for dorny/paths-filter to fetch a list of changed files | |
| pull-requests: read # for dorny/paths-filter to read pull requests | |
| outputs: | |
| go: ${{ steps.filter.outputs.go }} | |
| charts: ${{ steps.filter.outputs.charts }} | |
| baseimage: ${{ steps.filter.outputs.baseimage }} | |
| docs: ${{ steps.filter.outputs.docs }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: filter | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| filters: | | |
| go: | |
| - '**/*.go' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'images/ingate-controller/*' | |
| - 'versions/*' | |
| charts: | |
| - 'charts/ingate/Chart.yaml' | |
| - 'charts/ingate/**/*' | |
| baseimage: | |
| - 'images/ingate-controller/**' | |
| docs: | |
| - 'docs/*.md' | |
| test-go: | |
| name: test-go | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: | | |
| (needs.changes.outputs.go == 'true') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Get go version | |
| run: echo "GOLANG_VERSION=$(cat GOLANG_VERSION)" >> $GITHUB_ENV | |
| - name: Set up Go | |
| id: go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: ${{ env.GOLANG_VERSION }} | |
| check-latest: true | |
| - name: Run test | |
| run: make go.test.unit | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| outputs: | |
| golangversion: ${{ steps.golangversion.outputs.version }} | |
| if: | | |
| (needs.changes.outputs.go == 'true') || (needs.changes.outputs.charts == 'true') || (needs.changes.outputs.baseimage == 'true') | |
| env: | |
| PLATFORMS: linux/amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Get go version | |
| id: golangversion | |
| run: | | |
| echo "version=$(cat GOLANG_VERSION)" >> "$GITHUB_OUTPUT" | |
| - name: Set up Go | |
| id: go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: ${{ steps.golangversion.outputs.version }} | |
| check-latest: true | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| with: | |
| version: latest | |
| - name: Available platforms | |
| run: echo ${{ steps.buildx.outputs.platforms }} | |
| - name: Build images | |
| env: | |
| INGATE_VERSION: 1.0.0-dev | |
| ARCH: amd64 | |
| GOOS: linux | |
| PLATFORMS: linux/amd64 | |
| REGISTRY: gcr.io/k8s-staging/ingate | |
| run: | | |
| make go.build | |
| make docker.build | |
| echo "creating images cache..." | |
| docker save \ | |
| ${REGISTRY}/controller:${INGATE_VERSION} \ | |
| | gzip > docker.tar.gz | |
| - name: cache | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: docker.tar.gz | |
| path: docker.tar.gz | |
| retention-days: 5 | |
| linelint: | |
| runs-on: ubuntu-latest | |
| name: Check if all files end in newline | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Linelint | |
| uses: fernandrone/linelint@7907a5dca0c28ea7dd05c6d8d8cacded713aca11 # v0.0.6 | |
| id: linelint |