summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <worldhello.net@gmail.com>2020-10-10 09:22:36 +0800
committerLibravatar Jiang Xin <worldhello.net@gmail.com>2020-10-10 09:22:36 +0800
commitb4a48be10ce4bfbca3f859642ab3fc939a9adb43 (patch)
treeb110c10635b8207cbc3898a41d451c0bc9d711ec /.github/workflows
parentMerge branch 'fr_2.29.0_rnd_1' of github.com:jnavila/git (diff)
parentGit 2.29-rc1 (diff)
downloadtgif-b4a48be10ce4bfbca3f859642ab3fc939a9adb43.tar.xz
Merge tag 'v2.29.0-rc1' of github.com:git/git
Git 2.29-rc1 * tag 'v2.29.0-rc1' of github.com:git/git: Git 2.29-rc1 doc: fix the bnf like style of some commands doc: git-remote fix ups doc: use linkgit macro where needed. git-bisect-lk2009: make continuation of list indented ci: do not skip tagged revisions in GitHub workflows ci: skip GitHub workflow runs for already-tested commits/trees tests: avoid using the branch name `main` t1415: avoid using `main` as ref name Makefile: ASCII-sort += lists help: do not expect built-in commands to be hardlinked index-pack: make get_base_data() comment clearer index-pack: drop type_cas mutex index-pack: restore "resolving deltas" progress meter compat/mingw.h: drop extern from function declaration GitHub workflow: automatically follow minor updates of setup-msbuild t5534: split stdout and stderr redirection
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml41
1 files changed, 39 insertions, 2 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index fcfd138ff1..a940997f1b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -9,7 +9,7 @@ jobs:
ci-config:
runs-on: ubuntu-latest
outputs:
- enabled: ${{ steps.check-ref.outputs.enabled }}
+ enabled: ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
steps:
- name: try to clone ci-config branch
run: |
@@ -34,6 +34,43 @@ jobs:
enabled=no
fi
echo "::set-output name=enabled::$enabled"
+ - name: skip if the commit or tree was already tested
+ id: skip-if-redundant
+ uses: actions/github-script@v3
+ if: steps.check-ref.outputs.enabled == 'yes'
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+ script: |
+ // Figure out workflow ID, commit and tree
+ const { data: run } = await github.actions.getWorkflowRun({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ run_id: context.runId,
+ });
+ const workflow_id = run.workflow_id;
+ const head_sha = run.head_sha;
+ const tree_id = run.head_commit.tree_id;
+
+ // See whether there is a successful run for that commit or tree
+ const { data: runs } = await github.actions.listWorkflowRuns({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ per_page: 500,
+ status: 'success',
+ workflow_id,
+ });
+ for (const run of runs.workflow_runs) {
+ if (head_sha === run.head_sha) {
+ core.warning(`Successful run for the commit ${head_sha}: ${run.html_url}`);
+ core.setOutput('enabled', ' but skip');
+ break;
+ }
+ if (tree_id === run.head_commit.tree_id) {
+ core.warning(`Successful run for the tree ${tree_id}: ${run.html_url}`);
+ core.setOutput('enabled', ' but skip');
+ break;
+ }
+ }
windows-build:
needs: ci-config
@@ -154,7 +191,7 @@ jobs:
Expand-Archive compat.zip -DestinationPath . -Force
Remove-Item compat.zip
- name: add msbuild to PATH
- uses: microsoft/setup-msbuild@v1.0.0
+ uses: microsoft/setup-msbuild@v1
- name: copy dlls to root
shell: powershell
run: |