Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Add codeql GHAS workflow #2053

Add codeql GHAS workflow

Add codeql GHAS workflow #2053

Workflow file for this run

name: Windows CI
on:
push:
branches:
- main
pull_request:
env:
GO_VERSION: 1.19
jobs:
check-optional-tests:
name: Check if needs to run Windows build and tests
runs-on: ubuntu-latest
outputs:
trigger-windows: ${{steps.runwindowstest.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
name: Check if test Windows
if: github.event_name == 'pull_request'
id: runwindowstest
with:
trigger: '/test-windows'
windows-build:
name: Windows Build
runs-on: windows-latest
env:
GO111MODULE: "on"
needs: check-optional-tests
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-windows == 'true'
steps:
- name: Checkout code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Setup docker CLI
run: |
docker version
curl -L -o docker.exe https://github.com/StefanScherer/docker-cli-builder/releases/download/20.10.5/docker.exe
mv -Force ./docker.exe "C:\Program Files\Docker\"
docker version
- name: Test
run: make -f builder.Makefile test
- name: Build
env:
BUILD_TAGS: e2e
run: make -f builder.Makefile cli
- name: E2E Test
run: make e2e-win-ci
- name: ACI e2e Test
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
# need to docker logout on windows nodes, it seems GHActions does a `docker login --user githubactions` specifically on windows nodes
run: |
docker logout
make e2e-aci