summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-09-01 20:19:27 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-09-02 12:21:45 -0700
commit2fcf7a8c65605530380b263a60f0bb8e2c0bfc7b (patch)
tree949bc8f166d11a36ceb50661c51e8da0222cd4bf
parentci: fix indentation of the `ci-config` job (diff)
downloadtgif-2fcf7a8c65605530380b263a60f0bb8e2c0bfc7b.tar.xz
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 <johannes.schindelin@gmx.de> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--.github/workflows/main.yml3
1 files changed, 1 insertions, 2 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6fd1d1a2c8..fcfd138ff1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -12,7 +12,6 @@ jobs:
enabled: ${{ steps.check-ref.outputs.enabled }}
steps:
- name: try to clone ci-config branch
- continue-on-error: true
run: |
git -c protocol.version=2 clone \
--no-tags \
@@ -24,7 +23,7 @@ jobs:
https://github.com/${{ github.repository }} \
config-repo &&
cd config-repo &&
- git checkout HEAD -- ci/config
+ git checkout HEAD -- ci/config || : ignore
- id: check-ref
name: check whether CI is enabled for ref
run: |