Skip to content

Commit

Permalink
β™»οΈπŸš‡ Use GITHUB_OUTPUT instead of set-output in github actions (#1166)
Browse files Browse the repository at this point in the history
* β™»οΈπŸš‡ Use GITHUB_OUTPUT instead of set-output in github actions
* πŸ“šπŸ©Ή Fixed input description for doxygen workflow
* πŸš§πŸ“š Added change to changelog
  • Loading branch information
s-weigand authored Nov 5, 2022
1 parent db1e576 commit e2b21c0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
workflow_dispatch:
inputs:
pr_nr:
description: "pyglotaran branch/tag to run the examples against"
description: "PR number to create doxygen docs for, if omitted current branch is used."
required: false
default: ""
repo:
description: "pyglotaran branch/tag to run the examples against"
description: "Repository doxygen docs for."
required: true
default: "glotaran/pyglotaran"

Expand Down Expand Up @@ -52,7 +52,8 @@ jobs:
ref = merge_sha_by_pr_nr(int(pr_nr))
else:
ref = os.getenv("GITHUB_REF_NAME")
print(f"::set-output name=ref::{ref}")
with open(os.getenv("GITHUB_OUTPUT"), "a", encoding="utf8") as f:
f.writelines([f"ref={ref}"])
- uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.repo }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
asv run upstream/main^..upstream/main --machine gh_action
asv run HEAD^..HEAD --machine gh_action
asv publish
echo ::set-output name=last_tag::$last_tag
echo "last_tag=$last_tag" >> $GITHUB_OUTPUT
- name: Checkout benchmark result repo
uses: actions/checkout@v3
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/pr_benchmark_reaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,31 @@ jobs:
id: bench_diff
shell: python
run: |
import os
from pathlib import Path
comment_file_path = Path("pr-diff-comment.txt")
print(f"::set-output name=comment::{comment_file_path.read_text()}")
comment_file_path.unlink()
origin_pr_nr_file_path = Path("origin_pr_nr.txt")
print(f"::set-output name=pr_nr::{origin_pr_nr_file_path.read_text()}")
origin_pr_nr_file_path.unlink()
with open(os.getenv("GITHUB_OUTPUT"), "a", encoding="utf8") as f:
comment_file_path = Path("pr-diff-comment.txt")
f.writelines(
[
"comment<<EOF",
*comment_file_path.read_text().splitlines(),
"EOF",
]
)
comment_file_path.unlink()
origin_pr_nr_file_path = Path("origin_pr_nr.txt")
f.writelines([f"pr_nr={origin_pr_nr_file_path.read_text()}"])
origin_pr_nr_file_path.unlink()
- name: Show PR Number and Comment
shell: python
run: |
print(f"PR Number:\n{ ${{ steps.bench_diff.outputs.pr_nr }} }")
print("Comment Body:")
print("""${{ steps.bench_diff.outputs.comment }}""")
- name: Comment on PR
uses: hasura/comment-progress@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
- ✨ Add optimization history to result and iteration column to parameter history (#1134)
- ♻️ Complete refactor of model and parameter packages using attrs (#1135)


### πŸ‘Œ Minor Improvements:

- πŸ‘ŒπŸŽ¨ Wrap model section in result markdown in details tag for notebooks (#1098)
Expand Down Expand Up @@ -47,6 +46,7 @@
- πŸ”§ Set sourcery-ai target python version to 3.8 (#1095)
- πŸš‡πŸ©ΉπŸ”§ Fix manifest check (#1099)
- ♻️ Refactor: optimization (#1060)
- β™»οΈπŸš‡ Use GITHUB_OUTPUT instead of set-output in github actions (#1166)

(changes-0_6_0)=

Expand Down

0 comments on commit e2b21c0

Please sign in to comment.