Skip to content

Commit 95dd121

Browse files
committed
workflows
1 parent e8fe1fa commit 95dd121

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

.github/workflows/ci-alpine-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ jobs:
102102
printf '%s\n' "disable_qt5=yes" >> $GITHUB_ENV
103103
fi
104104
105-
- name: Docker - Copy repo patches to build folder ${{ inputs.distinct_id }}
106-
if: env.disable_qt5 != 'yes'
107-
run: if [[ -d patches ]]; then docker exec -w /root multiarch cp -r patches/* /root/${{ env.qbt_build_dir }}/patches; fi
105+
# - name: Docker - Copy repo patches to build folder ${{ inputs.distinct_id }}
106+
# if: env.disable_qt5 != 'yes'
107+
# run: if [[ -d patches ]]; then docker exec -w /root multiarch cp -r patches/* /root/${{ env.qbt_build_dir }}/patches; fi
108108

109109
- name: Docker - zlib-ng ${{ inputs.distinct_id }}
110110
if: env.disable_qt5 != 'yes'

.github/workflows/ci-auto-rerun-failed-jobs.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ on:
1212
retries:
1313
description: "The number of retries to rerun the workflow"
1414
required: true
15+
github_repo:
16+
description: "The repository to rerun the workflow"
17+
required: true
18+
distinct_id:
19+
description: "The distinct id of the workflow to rerun"
20+
required: false
1521

1622
jobs:
1723
gh-cli-rerun:
@@ -20,21 +26,25 @@ jobs:
2026
actions: write
2127
runs-on: ubuntu-latest
2228
env:
23-
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
29+
GH_TOKEN: "${{ secrets.PERSONAL_TOKEN || github.token }}"
2430
steps:
25-
- name: Host - Checkout action
31+
- name: Host - Checkout action ${{ inputs.distinct_id }}
2632
uses: actions/checkout@v4
2733

28-
- name: gh cli rerun and summaries
34+
- name: gh cli rerun and summaries ${{ inputs.distinct_id }}
2935
if: inputs.attempts <= inputs.retries
3036
run: |
31-
failures="$(gh run view ${{ inputs.run_id }} --log-failed | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g")"
32-
[[ -z "${failures}" ]] && failures="$(gh run view ${{ inputs.run_id }} | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g")"
37+
github_repo="${{ inputs.github_repo || github.repository }}"
38+
failures="$(gh run view ${{ inputs.run_id }} --log-failed --repo "${github_repo}" | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g")"
39+
40+
if [[ -z "${failures}" ]]; then
41+
failures="$(gh run view ${{ inputs.run_id }} --repo "${github_repo}" | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g")"
42+
fi
3343
3444
if [[ "${{ inputs.retries }}" -ge "2" ]]; then
35-
gh run rerun "${{ inputs.run_id }}" --failed --debug
45+
gh run rerun "${{ inputs.run_id }}" --failed --debug --repo "${github_repo}"
3646
else
37-
gh run rerun "${{ inputs.run_id }}" --failed
47+
gh run rerun "${{ inputs.run_id }}" --failed --repo "${github_repo}"
3848
fi
3949
4050
printf '%b\n' "# gh cli workflow reruns" >> $GITHUB_STEP_SUMMARY

.github/workflows/ci-main-reusable-caller.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ jobs:
106106
actions: write
107107
runs-on: ubuntu-latest
108108
env:
109-
GH_TOKEN: "${{ github.token }}"
109+
GH_TOKEN: "${{ secrets.AUTO_RERUN || github.token }}"
110110
steps:
111111
- uses: actions/checkout@v4
112112
- name: Trigger rerun workflow on job failures
113113
run: |
114114
inputs_retries="${{ github.event.inputs.retries }}"
115-
gh workflow run ci-auto-rerun-failed-jobs.yml -f run_id=${{ github.run_id }} -f attempts=${{ github.run_attempt }} -f retries=${inputs_retries:-1}
115+
gh workflow run ci-auto-rerun-failed-jobs.yml --repo "${{ env.github_repo || github.repository }}" -f run_id=${{ github.run_id }} -f attempts=${{ github.run_attempt }} -f retries=${inputs_retries:-1} -f github_repo=${{ github.repository }} -f distinct_id=${{ github.event.inputs.distinct_id }}
116+

0 commit comments

Comments
 (0)