From b01aff8c1cefb9c2e9a08c1ec313308de77b83ee Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 1 Sep 2020 20:19:26 +0000 Subject: ci: fix indentation of the `ci-config` job The section added in e76eec35540f (ci: allow per-branch config for GitHub Actions, 2020-05-07) contains a `&&`-chain that connects several commands. The first command is actually so long that it stretches over multiple lines, and as per usual, the continuation lines are indented one more level than the first. However, the subsequent commands in the `&&`-chain were also indented one more level than the first command, which was almost certainly unintended. Signed-off-by: Johannes Schindelin Acked-by: Jeff King Signed-off-by: Junio C Hamano --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30425404eb..6fd1d1a2c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,8 @@ jobs: --filter=blob:none \ https://github.com/${{ github.repository }} \ config-repo && - cd config-repo && - git checkout HEAD -- ci/config + cd config-repo && + git checkout HEAD -- ci/config - id: check-ref name: check whether CI is enabled for ref run: | -- cgit v1.2.3 From 2fcf7a8c65605530380b263a60f0bb8e2c0bfc7b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 1 Sep 2020 20:19:27 +0000 Subject: 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 Acked-by: Jeff King Signed-off-by: Junio C Hamano --- .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: | -- cgit v1.2.3