mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-21 21:49:31 -07:00
feat(artifacts.yml): add output variable 'result' to the filter job to indicate if any files in the scope have changed
This commit is contained in:
13
.github/workflows/artifacts.yml
vendored
13
.github/workflows/artifacts.yml
vendored
@@ -9,7 +9,8 @@ jobs:
|
|||||||
filter:
|
filter:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Filter
|
name: Filter
|
||||||
continue-on-error: true
|
outputs:
|
||||||
|
result: ${{ steps.changed-files-specific.outputs.any_changed }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@@ -23,14 +24,6 @@ jobs:
|
|||||||
package.json
|
package.json
|
||||||
assets/**
|
assets/**
|
||||||
|
|
||||||
- name: Run step if any file(s) in the scope change
|
|
||||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
|
||||||
run: echo "{result}={false}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Prevent from running
|
|
||||||
if: steps.changed-files-specific.outputs.any_changed != 'true'
|
|
||||||
run: echo "{result}={false}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -39,7 +32,7 @@ jobs:
|
|||||||
if: |
|
if: |
|
||||||
github.ref == 'refs/heads/main' &&
|
github.ref == 'refs/heads/main' &&
|
||||||
github.event.repository.fork == 'false' &&
|
github.event.repository.fork == 'false' &&
|
||||||
needs.filter.result == 'true'
|
needs.filter.outputs.result == 'true'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user