Skip to content

Commit 597e89b

Browse files
committed
remove matrix in steps
1 parent 42b58b1 commit 597e89b

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.github/workflows/compas-compile-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
# - name: Install TeXLive
3939
# uses: teatimeguest/setup-texlive-action@v3.3.4
4040
- name: Install dependencies on ubuntu
41-
if: startsWith(matrix.os, 'ubuntu-2')
4241
run: |
4342
cd misc/cicd-scripts
4443
chmod 755 linux-dependencies

.github/workflows/pr_artifact_url_commenter.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1313
steps:
14+
- name: Set up GitHub CLI
15+
uses: actions/setup-gh@v2
16+
with:
17+
version: latest
18+
19+
- name: Auth GitHub CLI
20+
run: gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
21+
1422
- name: Get Artifact and Pull request info
1523
env:
1624
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -24,8 +32,14 @@ jobs:
2432
SUITE_ID=$(jq -r '.check_suite_id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
2533
echo "SUITE_ID=$SUITE_ID" >> "$GITHUB_ENV"
2634
27-
ARTIFACT_ID=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" \
28-
--jq ".artifacts[] | select(.workflow_run.id==$PREVIOUS_JOB_ID and .expired==false and .name=='detailedEvolutionPlot.png') | .id" | head -n1)
35+
# Retry loop to wait for artifact availability
36+
for i in {1..5}; do
37+
ARTIFACT_ID=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" \
38+
--jq ".artifacts[] | select(.workflow_run.id==$PREVIOUS_JOB_ID and .expired==false and .name==\"detailedEvolutionPlot.png\") | .id" | head -n1)
39+
if [[ -n "$ARTIFACT_ID" ]]; then break; fi
40+
echo "Artifact not found yet. Retrying in 10s..."
41+
sleep 10
42+
done
2943
echo "ARTIFACT_ID=$ARTIFACT_ID" >> "$GITHUB_ENV"
3044
3145
PR_NUMBER=$(gh api "/repos/$OWNER/$REPO/commits/${{ github.event.workflow_run.head_sha }}/pulls" --jq '.[0].number')
@@ -37,15 +51,15 @@ jobs:
3751
- name: Download artifact
3852
if: env.PR_NUMBER != 'null' && env.ARTIFACT_ID != ''
3953
run: |
40-
gh api /repos/${{ github.repository }}/actions/artifacts/${{ env.ARTIFACT_ID }}/zip -H "Accept: application/vnd.github.v3+json" --output artifact.zip
54+
gh api /repos/${{ github.repository }}/actions/artifacts/${{ env.ARTIFACT_ID }}/zip --output artifact.zip
4155
unzip artifact.zip
4256
rm artifact.zip
4357
4458
- name: Update Comment
4559
if: env.PR_NUMBER != 'null' && env.ARTIFACT_ID != ''
4660
env:
4761
JOB_PATH: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ env.PREVIOUS_JOB_ID }}"
48-
ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/${{ env.SUITE_ID }}/artifacts/${{ env.ARTIFACT_ID }}"
62+
ARTIFACT_DL: "${{ github.server_url }}/${{ github.repository }}/actions/artifacts/${{ env.ARTIFACT_ID }}"
4963
uses: actions/github-script@v6
5064
with:
5165
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -65,11 +79,11 @@ jobs:
6579
| -------- | ----------------------- |
6680
| Commit | ${process.env.HEAD_SHA} |
6781
| Logs | ${process.env.JOB_PATH} |
68-
| Download | ${process.env.ARTIFACT_URL} |
82+
| Download | ${process.env.ARTIFACT_DL} |
6983
7084
### Detailed Evolution Plot
7185
![Detailed Evolution Plot](data:image/png;base64,${imageData})
7286
73-
[badge]: https://img.shields.io/badge/Build_Success!-0d1117?style=for-the-badge&labelColor=3fb950&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNMjEuMDMgNS43MmEuNzUuNzUgMCAwIDEgMCAxLjA2bC0xMS41IDExLjVhLjc0Ny43NDcgMCAwIDEtMS4wNzItLjAxMmwtNS41LTUuNzVhLjc1Ljc1IDAgMSAxIDEuMDg0LTEuMDM2bDQuOTcgNS4xOTVMMTkuOTcgNS43MmEuNzUuNzUgMCAwIDEgMS4wNiAwWiI+PC9wYXRoPjwvc3ZnPg==
87+
[badge]: https://img.shields.io/badge/Build_Success!-0d1117?style=for-the-badge&labelColor=3fb950
7488
`
75-
})
89+
})

0 commit comments

Comments
 (0)