Skip to content

Commit 2fcf7a8

Browse files
dschogitster
authored andcommitted
ci: avoid ugly "failure" in the ci-config job
In the common case where users have _not_ pushed a `ci-config` branch to configure which branches should be included in the GitHub workflow runs, there is a big fat ugly annotation about a failure in the run's log: X Check failure on line 1 in .github @github-actions github-actions / ci-config .github#L1 Process completed with exit code 128. The reason is that the `ci-config` job tries to clone that `ci-config` branch, and even if it is configured to continue on error, the annotation is displayed, and it is distracting. Let's just handle this on the shell script level, so that the job's step is not marked as a failure. Signed-off-by: Johannes Schindelin <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b01aff8 commit 2fcf7a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
enabled: ${{ steps.check-ref.outputs.enabled }}
1313
steps:
1414
- name: try to clone ci-config branch
15-
continue-on-error: true
1615
run: |
1716
git -c protocol.version=2 clone \
1817
--no-tags \
@@ -24,7 +23,7 @@ jobs:
2423
https://github.com/${{ github.repository }} \
2524
config-repo &&
2625
cd config-repo &&
27-
git checkout HEAD -- ci/config
26+
git checkout HEAD -- ci/config || : ignore
2827
- id: check-ref
2928
name: check whether CI is enabled for ref
3029
run: |

0 commit comments

Comments
 (0)