-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.64 KB
/
build.yml
File metadata and controls
49 lines (49 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Configure private Go modules
env:
RELEASES_TOKEN: ${{ secrets.RELEASES_TOKEN || github.token }}
run: |
git config --global url."https://x-access-token:${RELEASES_TOKEN}@github.com/GoCodeAlone/".insteadOf "https://github.com/GoCodeAlone/"
go env -w GOPRIVATE=github.com/GoCodeAlone/*
go env -w GONOSUMDB=github.com/GoCodeAlone/*
- name: Install wfctl
run: |
curl -fsSL -o wfctl https://github.com/GoCodeAlone/workflow/releases/download/v0.63.1/wfctl-linux-amd64
chmod +x wfctl
sudo mv wfctl /usr/local/bin/wfctl
- name: Test
env:
GIT_TERMINAL_PROMPT: "0"
run: GOWORK=off go test -timeout 2m ./...
- name: Checkout workflow-compute for provider alignment
uses: actions/checkout@v4
with:
repository: GoCodeAlone/workflow-compute
token: ${{ secrets.RELEASES_TOKEN }}
path: workflow-compute
- name: Check workflow-compute provider alignment
run: scripts/check-workflow-compute-alignment.sh "$GITHUB_WORKSPACE/workflow-compute"
- name: Validate workflow config
run: wfctl validate --allow-no-entry-points workflow.yaml
- name: Build with wfctl
run: wfctl build --config workflow.yaml --no-push --tag ci