Skip to content

Commit

Permalink
upgrade workflow dependencies, add arm64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
audacioustux authored Mar 1, 2024
1 parent 87ca93b commit 66af5f6
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 41 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ jobs:
- name: "Build:checkout"
uses: actions/checkout@v2
- name: "Build:buildx"
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: v0.9.1 # Buildx version
version: v0.12.1 # Buildx version
- name: "Build:login"
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build:dockerimage"
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.controller
push: true
build-args: |
GO_BUILDER_IMG=golang:1.19
GO_BUILDER_IMG=golang:1.22
tags: |
ghcr.io/grafana/k6-operator:${{ github.sha }}
Expand Down Expand Up @@ -66,14 +66,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v4
with:
version: v3.7.2
version: v3.14.0

- name: Create kind cluster
uses: helm/kind-action@v1.8.0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.19'
go-version: "1.22"
cache: false
- name: lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.55
args: --timeout=5m
14 changes: 7 additions & 7 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ on:
# happens on push to branches.
push:
branches:
- '**'
- "**"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v4
with:
version: v3.7.2
version: v3.14.0

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.0
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (lint)
run: ct lint --target-branch ${{ github.ref_name }} --config ./charts/ct.yaml
14 changes: 7 additions & 7 deletions .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ on:
push:
# run only on branches and not tags
branches:
- '**'
- "**"

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v4
with:
version: v3.7.2

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.0
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -36,7 +36,7 @@ jobs:
fi
- name: Create kind cluster
uses: helm/kind-action@v1.2.0
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
image_tag:
description: 'Image tag name.'
description: "Image tag name."
required: true
release:
types:
Expand All @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Build:checkout"
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: "Set image tag name"
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
Expand All @@ -28,38 +28,45 @@ jobs:
- name: "Check image tag name"
run: |
echo "IMAGETAG=${{env.IMAGETAG}}"
- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: "Build:buildx"
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: v0.9.1 # Buildx version
version: v0.12.1 # Buildx version
- name: "Build:login"
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build:dockerimage"
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
push: true
file: Dockerfile.controller
build-args: |
GO_BUILDER_IMG=golang:1.19
platforms: linux/amd64,linux/arm64
tags: ghcr.io/grafana/k6-operator:latest,ghcr.io/grafana/k6-operator:controller-${{env.IMAGETAG}}
- name: "Build:dockerimage"
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
push: true
file: Dockerfile.runner
platforms: linux/amd64,linux/arm64
tags: ghcr.io/grafana/k6-operator:latest-runner,ghcr.io/grafana/k6-operator:runner-${{env.IMAGETAG}}
- name: "Build:dockerimage"
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
push: true
file: Dockerfile.starter
platforms: linux/amd64,linux/arm64
tags: ghcr.io/grafana/k6-operator:latest-starter,ghcr.io/grafana/k6-operator:starter-${{env.IMAGETAG}}

bundle:
Expand All @@ -70,7 +77,7 @@ jobs:
pull-requests: write
steps:
- name: "Checkout code"
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: "Set image tag name"
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ jobs:
test:
strategy:
matrix:
go-version: [1.19.x]
k8s_version: [1.19.2, 1.24.1, 1.27.1]
go-version: [1.19]
k8s_version: [1.24.1, 1.27.1, 1.28.3]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Test
run: |
make test-setup-ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
lintAllTheThings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.controller
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY pkg/ pkg/


# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down

0 comments on commit 66af5f6

Please sign in to comment.