Skip to content

Support GitHub App installation tokens for push/sync #392

Support GitHub App installation tokens for push/sync

Support GitHub App installation tokens for push/sync #392

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: {}
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.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@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
with:
version: v2.18.2
args: --clean --snapshot
test:
name: Test
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.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
timeout-minutes: 30
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: ./go.mod
- name: Build
run: go build
- name: Test
run: >-
./codeql-action-sync sync
--source-token "$SOURCE_TOKEN"
--destination-url https://ghe.io/
--destination-repository codeql-action-sync-tool/integration-test
env:
SOURCE_TOKEN: ${{ github.token }}
CODEQL_ACTION_SYNC_TOOL_DESTINATION_TOKEN: ${{ secrets.INTEGRATION_TEST_GHES_TOKEN }}
lint:
name: Lint
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: ./go.mod
- name: Check Modules
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum
- name: Lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.13.2
licensedci:
name: Check Licenses
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: ./go.mod
- name: Setup licensedci
uses: licensee/setup-licensed@0d52e575b3258417672be0dff2f115d7db8771d8 # v1.3.2
with:
version: 2.15.2
github_token: ${{ github.token }}
- name: Run licensedci
run: licensed status