Duplicate job check
This commit is contained in:
parent
1778c0c3f1
commit
12b7200dfb
@ -1,13 +1,35 @@
|
|||||||
name: Publish geth to release
|
name: Test, Build, and/or Publish
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
pre_job:
|
||||||
|
# continue-on-error: true # Uncomment once integration is finished
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Map a step output to a job output
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@v4
|
||||||
|
with:
|
||||||
|
# All of these options are optional, so you can remove them if you are happy with the defaults
|
||||||
|
concurrent_skipping: "never"
|
||||||
|
skip_after_successful_duplicate: "true"
|
||||||
|
do_not_skip: '["workflow_dispatch", "schedule"]'
|
||||||
run-tests:
|
run-tests:
|
||||||
uses: ./.github/workflows/tests.yml
|
uses: ./.github/workflows/tests.yml
|
||||||
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
||||||
|
needs: pre_job
|
||||||
build:
|
build:
|
||||||
name: Run docker build and publish
|
name: Run docker build and publish
|
||||||
needs: run-tests
|
needs: run-tests
|
||||||
|
if: |
|
||||||
|
always() &&
|
||||||
|
(needs.run-tests.result == 'success' || needs.run-tests.result == 'skipped') &&
|
||||||
|
github.event_name == 'release'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -25,6 +47,10 @@ jobs:
|
|||||||
push_to_registries:
|
push_to_registries:
|
||||||
name: Publish assets to Release
|
name: Publish assets to Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: |
|
||||||
|
always() &&
|
||||||
|
(needs.build.result == 'success') &&
|
||||||
|
github.event_name == 'release'
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Get the version
|
- name: Get the version
|
7
.github/workflows/on-pr.yml
vendored
7
.github/workflows/on-pr.yml
vendored
@ -1,7 +0,0 @@
|
|||||||
name: Build and test
|
|
||||||
|
|
||||||
on: [pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run-tests:
|
|
||||||
uses: ./.github/workflows/tests.yml
|
|
Loading…
Reference in New Issue
Block a user