Skip to content

Add GitHub App token generation and dispatch job for System Agent Upgrade workflow. #514

Add GitHub App token generation and dispatch job for System Agent Upgrade workflow.

Add GitHub App token generation and dispatch job for System Agent Upgrade workflow. #514

name: CI on Pull Request
on:
pull_request:
jobs:
test-build-linux:
runs-on: ubuntu-latest
container:
image: rancher/dapper:v0.6.0
permissions:
contents: read
strategy:
matrix:
os: [ linux ]
arch: [ amd64, arm64 ]
steps:
- name: Fix the not-a-git-repository issue
run: |
apk -U add git
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout code
uses: actions/checkout@v4
- name: Set environment variables
run: |
echo "DAPPER_HOST_ARCH=${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "GH_VERSION=${{ github.ref_name }}" >> "$GITHUB_ENV"
echo "GOARCH=${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "GOOS=${{ matrix.os }}" >> "$GITHUB_ENV"
echo "CROSS=false" >> "$GITHUB_ENV"
- name: build with Dapper
run: dapper gha-ci
test-build-windows:
strategy:
matrix:
os: [ windows ]
platform: [ windows-2019, windows-latest ]
arch: [ amd64 ]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Dependencies
run: |
go install github.com/golangci/golangci-lint/cmd/[email protected]
- name: Set environment variables
run: |
echo "DAPPER_HOST_ARCH=${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "GH_VERSION=${{ github.ref_name }}" >> "$GITHUB_ENV"
echo "GOARCH=${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "GOOS=${{ matrix.os }}" >> "$GITHUB_ENV"
echo "CROSS=false" >> "$GITHUB_ENV"
- name: Build and Test
run: bash ./scripts/gha-ci