Skip to content

Build, lint and test trigger-argo-workflow #1189

Build, lint and test trigger-argo-workflow

Build, lint and test trigger-argo-workflow #1189

name: Build, lint and test `trigger-argo-workflow`
on:
push:
branches:
- main
paths:
- "actions/trigger-argo-workflow/**"
pull_request:
paths:
- "actions/trigger-argo-workflow/**"
types:
- edited
- opened
- ready_for_review
- synchronize
merge_group:
permissions:
contents: read
jobs:
lint-test-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: actions/trigger-argo-workflow
permissions:
contents: read
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
check-latest: true
cache-dependency-path: |
actions/trigger-argo-workflow/go.sum
go-version-file: "actions/trigger-argo-workflow/go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: latest
working-directory: actions/trigger-argo-workflow
- name: Run tests
run: go test -v ./...
- name: Build
run: go build -o trigger-argo-workflow ./...