mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 10:57:42 +08:00
This is pretty common when working through PRs and ends up causing tons of in-flight GitHub Actions workflows running because they aren't currently canceled when a new commit is added. This will cancel previous runs if a new commit is added on a branch (which is the behavior we had on CircleCI).
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Go Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
go-build-runner:
|
|
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
|
|
uses: ipfs/kubo/.github/workflows/runner.yml@master
|
|
go-build:
|
|
needs: [go-build-runner]
|
|
runs-on: ${{ fromJSON(needs.go-build-runner.outputs.config).labels }}
|
|
timeout-minutes: 20
|
|
env:
|
|
TEST_NO_DOCKER: 1
|
|
TEST_VERBOSE: 1
|
|
TRAVIS: 1
|
|
GIT_PAGER: cat
|
|
IPFS_CHECK_RCMGR_DEFAULTS: 1
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19.1
|
|
- uses: actions/checkout@v3
|
|
- uses: protocol/cache-go-action@v1
|
|
with:
|
|
name: ${{ github.job }}
|
|
- run: make cmd/ipfs-try-build
|
|
env:
|
|
TEST_NO_FUSE: 0
|
|
- run: make cmd/ipfs-try-build
|
|
env:
|
|
TEST_NO_FUSE: 1
|