Skip to content

Commit 1e3bdaa

Browse files
Copilotpancetta
andcommitted
Fix pipeline: fix SyntaxError from unescaped quotes, replace deprecated set-output, update action versions
Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com>
1 parent 7a1c001 commit 1e3bdaa

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

.github/workflows/arxiv_to_publications_correct.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
pull_request:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v4
1010
- name: Look for bibtex entries that now have a DOI
1111
if: github.event.label.name == 'food for arxivbot'
1212
run: |
@@ -15,12 +15,16 @@ jobs:
1515
python3 -m pip install --user setuptools
1616
python3 -m pip install --user bibtexparser
1717
python3 arxiv_to_publications_correct.py -b "${{ github.event.issue.body }}" > comment.out 2>&1
18-
echo "::set-output name=COMMENT::$(cat comment.out)"
18+
{
19+
echo 'COMMENT<<GITHUB_OUTPUT_DELIMITER'
20+
cat comment.out
21+
echo 'GITHUB_OUTPUT_DELIMITER'
22+
} >> "$GITHUB_OUTPUT"
1923
rm -rf comment.out
2024
id: updater
2125
- name: Create Pull Request
2226
if: github.event.label.name == 'food for arxivbot'
23-
uses: peter-evans/create-pull-request@v3
27+
uses: peter-evans/create-pull-request@v7
2428
with:
2529
token: ${{ secrets.GITHUB_TOKEN }}
2630
commit-message: updated pint.bib using arxivbot
@@ -30,8 +34,10 @@ jobs:
3034
branch-suffix: short-commit-hash
3135
- name: Add comment to issue
3236
if: github.event.label.name == 'food for arxivbot' && steps.updater.outputs.COMMENT != ''
33-
uses: actions/github-script@0.3.0
37+
uses: actions/github-script@v7
38+
env:
39+
COMMENT: ${{ steps.updater.outputs.COMMENT }}
3440
with:
3541
github-token: ${{secrets.GITHUB_TOKEN}}
3642
script: |
37-
github.issues.createComment({...context.issue, body: "${{ steps.updater.outputs.COMMENT }}"})
43+
github.rest.issues.createComment({...context.issue, body: process.env.COMMENT})

.github/workflows/arxiv_to_publications_detect.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ jobs:
88
pull_request:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v1
11+
- uses: actions/checkout@v4
1212
- name: Look for bibtex entries that now have a DOI
1313
run: |
1414
cd bin
1515
python3 -m pip install --user --upgrade pip
1616
python3 -m pip install --user setuptools
1717
python3 -m pip install --user python-Levenshtein bibtexparser
1818
python3 arxiv_to_publications_detect.py > issue.md 2>&1
19-
echo "::set-output name=ISSUE::$(cat issue.md)"
19+
{
20+
echo 'ISSUE<<GITHUB_OUTPUT_DELIMITER'
21+
cat issue.md
22+
echo 'GITHUB_OUTPUT_DELIMITER'
23+
} >> "$GITHUB_OUTPUT"
2024
id: updater
2125
- name: Create issue from output
2226
uses: JasonEtco/create-an-issue@v2

.github/workflows/issue_to_bib.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
pull_request:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v4
1010
- name: Parse issue and update bibtex file
1111
if: github.event.label.name == 'food for bibbot'
1212
run: |
@@ -15,12 +15,16 @@ jobs:
1515
python3 -m pip install --user setuptools
1616
python3 -m pip install --user bibtexparser arxivcheck
1717
python3 issue_to_bibtex.py -b "${{ github.event.issue.body }}" > comment.out 2>&1
18-
echo "::set-output name=COMMENT::$(cat comment.out)"
18+
{
19+
echo 'COMMENT<<GITHUB_OUTPUT_DELIMITER'
20+
cat comment.out
21+
echo 'GITHUB_OUTPUT_DELIMITER'
22+
} >> "$GITHUB_OUTPUT"
1923
rm -rf comment.out
2024
id: updater
2125
- name: Create Pull Request
2226
if: github.event.label.name == 'food for bibbot'
23-
uses: peter-evans/create-pull-request@v3
27+
uses: peter-evans/create-pull-request@v7
2428
with:
2529
token: ${{ secrets.GITHUB_TOKEN }}
2630
commit-message: updated pint.bib using bibbot
@@ -29,9 +33,11 @@ jobs:
2933
branch: bibtex-bibbot-${{ github.event.issue.number }}
3034
branch-suffix: short-commit-hash
3135
- name: Add comment to issue
32-
uses: actions/github-script@0.3.0
36+
uses: actions/github-script@v7
3337
if: github.event.label.name == 'food for bibbot' && steps.updater.outputs.COMMENT != ''
38+
env:
39+
COMMENT: ${{ steps.updater.outputs.COMMENT }}
3440
with:
3541
github-token: ${{secrets.GITHUB_TOKEN}}
3642
script: |
37-
github.issues.createComment({...context.issue, body: '${{ steps.updater.outputs.COMMENT }}'})
43+
github.rest.issues.createComment({...context.issue, body: process.env.COMMENT})

0 commit comments

Comments
 (0)