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

Updating actions to their latest version #2628

Merged
merged 5 commits into from
May 31, 2024
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
8 changes: 4 additions & 4 deletions .github/actions/setup_lfs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
shell: bash

- name: Restore LFS cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
id: lfs-cache-refdata
with:
path: tardis-refdata/.git/lfs
Expand All @@ -49,7 +49,7 @@ runs:
# uses fake ternary
# for reference: https://github.com/orgs/community/discussions/26738#discussioncomment-3253176
if: ${{ steps.lfs-cache-refdata.outputs.cache-hit != 'true' && always() || false }}
uses: actions/cache/save@v3
uses: actions/cache/save@v4
id: lfs-cache-refdata-save
with:
path: tardis-refdata/.git/lfs
Expand All @@ -67,7 +67,7 @@ runs:
shell: bash

- name: Restore LFS cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
id: lfs-cache-regression-data
with:
path: tardis-regression-data/.git/lfs
Expand All @@ -89,7 +89,7 @@ runs:
# uses fake ternary
# for reference: https://github.com/orgs/community/discussions/26738#discussioncomment-3253176
if: ${{ steps.lfs-cache-regression-data.outputs.cache-hit != 'true' && always() || false }}
uses: actions/cache/save@v3
uses: actions/cache/save@v4
id: lfs-cache-regression-data-save
with:
path: tardis-regression-data/.git/lfs
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'benchmarks')))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: github.event_name != 'pull_request_target'
with:
fetch-depth: 0

- name: Checkout pull/${{ github.event.number }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
if: github.event_name == 'pull_request_target'

- name: Restore Atom Data
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
id: atom-data-restore
with:
path: benchmarks/data/kurucz_cd23_chianti_H_He.h5
Expand All @@ -59,7 +59,7 @@ jobs:
wget -q "$REPO_URL/items?path=atom_data/kurucz_cd23_chianti_H_He.h5&versionType=branch&version=master&resolveLfs=true" -O benchmarks/data/kurucz_cd23_chianti_H_He.h5

- name: Save Atom Data
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: ${{ steps.atom-data-restore.outputs.cache-hit != 'true' && always() || false }}
id: atom-data-cache-save
with:
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
URL: https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/actions/runs/${{ github.run_id }}?check_suite_focus=true

- name: Save results artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
EVENT: ${{ github.event_name }}

- name: Deploy ${{ env.DEST_DIR }}
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.BOT_TOKEN }}
publish_branch: ${{ env.DEPLOY_BRANCH }}
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/clean-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,24 @@
name: clean-docs

on:

delete:
branches: # remove deleted branches
- '*'
branches: # remove deleted branches
- "*"

pull_request_target: # remove closed or merged pull requests
pull_request_target: # remove closed or merged pull requests
branches:
- '*'
- "*"
types:
- closed

env:
DEPLOY_BRANCH: gh-pages # deployed docs branch
DEPLOY_BRANCH: gh-pages # deployed docs branch

jobs:
clean:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set folder to delete
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.x

Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/docstr-cov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Log in to jsonbin.org with tardis-bot GitHub account to get an API key and
# Log in to jsonbin.org with tardis-bot GitHub account to get an API key and
# store it as a repository secret.

# Updated badge will be available at:
Expand All @@ -9,11 +9,11 @@ name: docstr-cov
on:
push:
branches:
- master
- master

pull_request:
branches:
- master
- master

env:
THRESHOLD: 0.05
Expand All @@ -25,13 +25,12 @@ jobs:
check:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x

Expand All @@ -47,7 +46,7 @@ jobs:
elif [[ ${{ github.event_name }} == 'pull_request' ]]; then
echo "BASE=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV
echo "HEAD=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV

else
echo "Unexpected event trigger"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mailmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:
release:
types: [published]

workflow_dispatch: # manual trigger
workflow_dispatch: # manual trigger

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
repository: tardis-sn/tardis
token: ${{ secrets.BOT_TOKEN }}
Expand All @@ -26,23 +26,23 @@ jobs:
- name: Update changelog
run: github-changes -o tardis-sn -r tardis --only-pulls --use-commit-body -f CHANGELOG.md -k ${{ secrets.BOT_TOKEN }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: changelog
path: CHANGELOG.md

citation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Wait for Zenodo webhook
run: sleep 180

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install doi2cff
run: pip install git+https://github.com/citation-file-format/doi2cff
Expand All @@ -52,31 +52,31 @@ jobs:
rm CITATION.cff
doi2cff init 10.5281/zenodo.592480

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: citation
path: CITATION.cff

credits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Wait for Zenodo webhook
run: sleep 180

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install rst-include
- name: Install rst-include
run: pip install rst-include==2.1.2.2 requests==2.27.1

- name: Update README.rst
run: python .ci-helpers/update_credits.py

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: credits
path: |
Expand All @@ -87,9 +87,9 @@ jobs:
needs: [changelog, citation, credits]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: /tmp

Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: pre-release

on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch: # manual trigger
- cron: "0 0 * * 0"
workflow_dispatch: # manual trigger

defaults:
run:
Expand All @@ -17,7 +17,7 @@ jobs:
zenodo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
repository: tardis-sn/tardis_zenodo
token: ${{ secrets.BOT_TOKEN }}
Expand All @@ -28,14 +28,14 @@ jobs:
KEY_SECRET_JSON: ${{ secrets.ZENODO_KEY_SECRET_JSON }}

- name: Download Lock File
run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock
run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock

- name: Generate Cache Key
run: |
run: |
file_hash=$(cat conda-linux-64.lock | shasum -a 256 | cut -d' ' -f1)
echo "file_hash=$file_hash" >> "${GITHUB_OUTPUT}"
id: cache-environment-key

- uses: mamba-org/setup-micromamba@v1
with:
environment-file: conda-linux-64.lock
Expand All @@ -52,7 +52,7 @@ jobs:
run: jupyter nbconvert gather_data.ipynb --to html --execute --ExecutePreprocessor.timeout=6000 --allow-errors
if: failure()

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: zenodo_json
path: .zenodo.json
Expand All @@ -61,9 +61,9 @@ jobs:
needs: zenodo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: /tmp

Expand Down Expand Up @@ -137,4 +137,4 @@ jobs:
if: steps.create-pr.outputs.pull-request-operation == 'created'

compare_refdata:
uses: tardis-sn/tardis-refdata/.github/workflows/compare-refdata.yml@master
uses: tardis-sn/tardis-refdata/.github/workflows/compare-refdata.yml@master
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ on:
branches: [master]
types: [closed]

workflow_dispatch: # manual trigger
workflow_dispatch: # manual trigger

jobs:
create:
if: github.event_name == 'workflow_dispatch' ||
(startsWith(github.head_ref, 'pre-release-20') && github.event.pull_request.merged == true)
(startsWith(github.head_ref, 'pre-release-20') && github.event.pull_request.merged == true)

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install setuptools_scm
run: pip install 'setuptools_scm<7'
Expand All @@ -34,7 +34,7 @@ jobs:
run: python .ci-helpers/get_current_version.py

- name: Get next version
run: |
run: |
python .ci-helpers/get_next_version.py
echo "NEW_TAG=$(python .ci-helpers/get_next_version.py)" >> $GITHUB_ENV

Expand Down
Loading
Loading