Skip to content

Bump actions/setup-go from 6.0.0 to 6.1.0 #66

Bump actions/setup-go from 6.0.0 to 6.1.0

Bump actions/setup-go from 6.0.0 to 6.1.0 #66

Workflow file for this run

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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- 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@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Linelint
uses: fernandrone/linelint@7907a5dca0c28ea7dd05c6d8d8cacded713aca11 # v0.0.6
id: linelint