Skip to content

lint

lint #12

name: runtime-operator
on:
push:
branches:
- "main"
tags:
- "v*"
pull_request:
paths:
- "runtime-operator/**"
- "proto/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
permissions:
# Required: allow read access to the content for analysis.
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/lint-go
with:
working-directory: runtime-operator
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/setup-go
- name: Build
working-directory: runtime-operator
run: make build
- name: Test
working-directory: runtime-operator
run: make test
test-e2e:
needs: [lint, test]
runs-on: ubuntu-latest
# NOTE(lxf): Disabled until we update prometheus/cert-manager in the test setup
if: false
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/setup-go
- uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: kind
- name: Running Test e2e
working-directory: runtime-operator
run: make test-e2e
canary:
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'canary')
needs: [lint, test]
permissions:
contents: write
packages: write
uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
working-directory: runtime-operator
file: runtime-operator/Dockerfile
image: ghcr.io/wasmcloud/runtime-operator
push: true
tags: |
type=raw,value=canary
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint, test]
permissions:
contents: write
packages: write
uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
working-directory: runtime-operator
file: runtime-operator/Dockerfile
image: ghcr.io/wasmcloud/runtime-operator
push: true
tags: |
type=semver,pattern={{version}},value=${{ github.ref_name }}