feat: added fetching cors options from envs #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
pull_request: | |
branches: | |
- master | |
name: Stucco build | |
env: | |
CGO_ENABLED: 0 | |
jobs: | |
build_cli: | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
strategy: | |
matrix: | |
go-version: [1.18.x] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
goarch: [amd64, 386, arm64] | |
include: | |
- platform: ubuntu-latest | |
goos: linux | |
- platform: macos-latest | |
goos: darwin | |
- platform: windows-latest | |
goos: windows | |
ext: '.exe' | |
exclude: | |
- platform: macos-latest | |
goarch: 386 | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: setup go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: checkout | |
uses: actions/checkout@v1 | |
- name: cache deps | |
uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: build tasks | |
run: go build -o tasks ./hack/tasks.go | |
- name: build cli | |
run: ./tasks bin/cli/${{ matrix.goos }}/${{ matrix.goarch }}/stucco${{ matrix.ext }} | |
- name: test | |
env: | |
CGO_ENABLED: 1 | |
run: | | |
./tasks test | |
./tasks test-race | |
build_azure_function: | |
needs: | |
- build_cli | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
strategy: | |
matrix: | |
go-version: [1.18.x] | |
platform: [ubuntu-latest] | |
include: | |
- platform: ubuntu-latest | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: setup go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: checkout | |
uses: actions/checkout@v1 | |
- name: cache deps | |
uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: build tasks | |
run: go build -o tasks ./hack/tasks.go | |
- name: build azure function | |
run: ./tasks build_azure_function |