Skip to content

fleetctl: Add option to specify id for lock/release #287

fleetctl: Add option to specify id for lock/release

fleetctl: Add option to specify id for lock/release #287

Workflow file for this run

---
name: CI
on:
workflow_dispatch:
inputs:
tag:
description: "Use to set tag, default: rolling"
type: string
default: "rolling"
required: false
dry-run:
description: "Do not push image"
type: boolean
default: false
required: false
latest:
description: "Tag latest"
type: boolean
default: false
required: false
workflow_call:
inputs:
tag:
description: "Use to set tag, default: rolling"
type: string
default: "rolling"
required: false
dry-run:
description: "Do not push image"
type: boolean
default: false
required: false
latest:
description: "Tag latest"
type: boolean
default: false
required: false
push:
branches: ["main"]
paths:
- "go.mod"
- "go.sum"
- "*.go"
- "**/*.go"
- "Dockerfile"
pull_request:
branches: ["main"]
merge_group:
branches: ["main"]
jobs:
lint:
uses: heathcliff26/ci/.github/workflows/golang-lint.yaml@main
unit-tests:
uses: heathcliff26/ci/.github/workflows/golang-unit-tests.yaml@main
validate:
uses: heathcliff26/ci/.github/workflows/golang-build.yaml@main
with:
cache: false
cmd: "make validate"
build-fleetctl:
uses: heathcliff26/ci/.github/workflows/golang-build.yaml@main
needs:
- lint
- unit-tests
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
- arch: arm64
with:
release: "${{ github.event_name == 'pull_request' && 'dev' || inputs.tag == '' && 'rolling' || inputs.tag }}"
goos: "linux"
goarch: "${{ matrix.arch }}"
artifact: "bin/fleetctl-${{ matrix.arch }}"
artifact-name: "fleetctl-${{ matrix.arch }}"
cmd: "hack/build.sh fleetctl fleetctl-${{ matrix.arch }}"
secrets: inherit
build-fleetlock:
uses: heathcliff26/ci/.github/workflows/build-container.yaml@main
needs:
- lint
- unit-tests
permissions:
contents: read
packages: write
with:
dockerfile: Dockerfile
tag: "${{ inputs.tag == '' && 'rolling' || inputs.tag }}"
tags: "${{ inputs.latest == true && 'type=raw,value=latest' || '' }}"
dry-run: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || inputs.dry-run == 'true' }}
build-args: "RELEASE_VERSION=${{ inputs.tag == '' && 'rolling' || inputs.tag }}"
secrets: inherit
build-manifests:
uses: heathcliff26/ci/.github/workflows/golang-build.yaml@main
if: ${{ github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
needs:
- validate
with:
release: "${{ github.event_name == 'pull_request' && 'dev' || inputs.tag == '' && 'rolling' || inputs.tag }}"
artifact: "manifests/release/*.yaml"
artifact-name: "manifests"
cmd: "make manifests"
cache: false
secrets: inherit