Skip to content

Improve UX around --os-include/--os-exclude and --destination-url #376

Improve UX around --os-include/--os-exclude and --destination-url

Improve UX around --os-include/--os-exclude and --destination-url #376

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: {}
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod
- name: Install Pkger
run: go install --mod=readonly github.com/markbates/pkger/cmd/pkger
- name: Build
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
version: latest
args: --clean --snapshot
test:
name: Test
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod
- name: Test
run: go test ./...
integration_ghes:
name: Integration Test (GitHub Enterprise Server)
runs-on: ubuntu-latest-xl
if: ${{ github.event != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod
- name: Build
run: go build
- name: Test
run: ./codeql-action-sync sync --destination-url https://ghe.io/ --destination-repository codeql-action-sync-tool/integration-test
env:
CODEQL_ACTION_SYNC_TOOL_DESTINATION_TOKEN: ${{ secrets.INTEGRATION_TEST_GHES_TOKEN }}
lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod
- name: Check Modules
run: |
go mod tidy
if [ ! -z "$(git status --porcelain=v1)" ]; then
>&2 echo "Please run \`go mod tidy\` and commit the result."
exit 1
fi
- name: Lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
licensedci:
name: Check Licenses
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod
- name: Setup licensedci
uses: jonabc/setup-licensed@d6b3a6f7058c2b40c06d205e13e15c2418977566 # v1.1.4
with:
version: 2.x
- name: Run licensedci
run: licensed status