Skip to content

Commit fba9d02

Browse files
committed
temp
1 parent 52d7bdd commit fba9d02

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

.github/workflows/build-linux.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ on:
44
push:
55
branches:
66
- master
7+
- refactor-b # temp
78
tags:
89
- v*
910
pull_request:
1011

11-
1212
jobs:
1313
build-linux:
1414
name: Build (Unix-like OSes)
15-
env:
16-
DEBIAN_FRONTEND: noninteractive
1715
uses: ./.github/workflows/go-build.yml
1816
with:
1917
os-version: ubuntu-latest

.github/workflows/go-build.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -46,40 +46,46 @@ on:
4646
required: false
4747
type: string
4848

49+
env:
50+
DEBIAN_FRONTEND: noninteractive
4951
jobs:
5052
run:
5153
runs-on: ${{ inputs.os-version }}
5254
env:
53-
CGO_ENABLED: ${{ inputs.with-cgo - 0 }} # {false|true} -> {0|1}
55+
CGO_ENABLED: ${{ inputs.with-cgo && 1 || 0 }}
5456
steps:
5557
- uses: actions/setup-go@v5
5658
with:
5759
go-version: ${{ inputs.go-version }}
5860
cache: true
5961
- name: Setup environment variables
62+
id: spec
6063
run: |
6164
GOHOSTARCH="$(go env GOHOSTARCH)"
62-
echo "GOARCH=${INPUT_ARCHITECTURE:-$GOHOSTARCH}" >>"$GITHUB_ENV"
65+
GOARCH="${INPUT_ARCHITECTURE:-$GOHOSTARCH}"
66+
echo "GOARCH=$GOARCH" >>"$GITHUB_ENV"
6367
6468
GOHOSTOS="$(go env GOHOSTOS)"
65-
echo "GOOS=${INPUT_PLATFORM:-$GOHOSTOS}" >>"$GITHUB_ENV"
69+
GOOS="${INPUT_PLATFORM:-$GOHOSTOS}"
70+
echo "GOOS=$GOOS" >>"$GITHUB_ENV"
6671
67-
shell=bash
6872
if [[ $GOHOSTOS = windows && $CGO_ENABLED = 1 ]]
6973
then
70-
shell='msys2 {0}'
71-
case $GOARCH in
74+
case "$GOARCH" in
7275
*64)
73-
echo 'MSYS=MINGW64' >>"$GITHUB_ENV"
76+
echo 'MSYS=MINGW64' >>"$GITHUB_ENV" ;;
7477
*)
75-
echo 'MSYS=MINGW32' >>"$GITHUB_ENV"
78+
echo 'MSYS=MINGW32' >>"$GITHUB_ENV" ;;
7679
esac
7780
fi
78-
echo "shell=$shell" >>"$GITHUB_STATE"
7981
shell: bash
8082
- uses: actions/checkout@v4
81-
- run: ${{ inputs.run }}
82-
shell: ${{ state.shell }}
83+
- if: env.MSYS == ''
84+
run: ${{ inputs.run }}
85+
shell: bash
86+
- if: env.MSYS != ''
87+
run: ${{ inputs.run }}
88+
shell: msys2 {0}
8389
- if: inputs.upload-artifact-path != ''
8490
uses: actions/upload-artifact@v4
8591
with:

0 commit comments

Comments
 (0)