Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️🚇 Use GITHUB_OUTPUT instead of set-output in github actions #1166

Merged
merged 3 commits into from
Nov 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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