From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 2/2] ci: avoid ugly "failure" in the `ci-config` job
Date: Tue, 01 Sep 2020 20:19:27 +0000 [thread overview]
Message-ID: <b92374e69192d57bcb11fb2573beb4e9aee339a9.1598991568.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.719.git.1598991568.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
---
.github/workflows/main.yml | 3 +--
1 file changed, 1 insertion(+), 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: |
--
gitgitgadget
next prev parent reply other threads:[~2020-09-01 20:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 20:19 [PATCH 0/2] ci: avoid ugly "failure" annotation in the GitHub workflow Johannes Schindelin via GitGitGadget
2020-09-01 20:19 ` [PATCH 1/2] ci: fix indentation of the `ci-config` job Johannes Schindelin via GitGitGadget
2020-09-02 0:33 ` Jeff King
2020-09-01 20:19 ` Johannes Schindelin via GitGitGadget [this message]
2020-09-02 0:40 ` [PATCH 2/2] ci: avoid ugly "failure" in " Jeff King
2020-09-02 19:21 ` [PATCH 0/2] ci: avoid ugly "failure" annotation in the GitHub workflow Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b92374e69192d57bcb11fb2573beb4e9aee339a9.1598991568.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).