Skip to content

Commit

Permalink
GHA version
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Jun 23, 2024
1 parent 4154420 commit 133aac1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.x'
- name: Cache python venv
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@v4
if: ${{ contains(runner.name, 'GitHub Actions') }}
id: cache-venv
with:
Expand All @@ -48,25 +48,25 @@ jobs:
echo "PYTHON=${VIRTUAL_ENV}/bin/python" >> $GITHUB_ENV
echo "JULIA_PYTHONCALL_EXE=${VIRTUAL_ENV}/bin/python">> $GITHUB_ENV
- name: Cache executed notebooks
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@0v4
id: cache-nb
with:
path: ${{ env.NBCACHE }}
key: ${{ runner.os }}-nb-${{ env.CACHE_NUM }}-${{ hashFiles('src/**', 'Project.toml', 'Manifest.toml', 'requirements.txt') }}-${{ hashFiles('docs/**/*.ipynb', 'docs/**/*.jl') }}
restore-keys: |
${{ runner.os }}-nb-${{ env.CACHE_NUM }}-${{ hashFiles('src/**', 'Project.toml', 'Manifest.toml', 'requirements.txt') }}-
- name: Read Julia version
uses: SebRollen/toml-action@b1b3628f55fc3a28208d4203ada8b737e9687876 # v1.2.0
uses: SebRollen/[email protected]
id: read_toml
with:
file: 'Manifest.toml'
field: 'julia_version'
- name: Setup Julia
uses: julia-actions/setup-julia@81d42b556a18b0d67455a742fcbffdeb49b3ffb0 # v2
uses: julia-actions/setup-julia@v2
with:
version: ${{ steps.read_toml.outputs.value }}
- name: Restore Julia packages
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache/restore@v4
if: ${{ contains(runner.name, 'GitHub Actions') }}
id: cache-julia
with:
Expand All @@ -87,7 +87,7 @@ jobs:
Pkg.precompile()
Pkg.gc(collect_delay=Day(0))
- name: Save Julia packages
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache/save@v4
if: ${{ contains(runner.name, 'GitHub Actions') && steps.cache-julia.outputs.cache-hit != 'true' }}
with:
path: |
Expand All @@ -102,7 +102,7 @@ jobs:
run: jupyter-book build docs/
- name: Upload pages artifact
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html/

Expand All @@ -122,4 +122,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
uses: actions/deploy-pages@v4
8 changes: 4 additions & 4 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@81d42b556a18b0d67455a742fcbffdeb49b3ffb0 # v2
uses: julia-actions/setup-julia@v2
- name: Convert literate notebooks to ipynb files
shell: julia --color=yes {0}
working-directory: ${{ env.DIR }}
Expand All @@ -41,12 +41,12 @@ jobs:
end
end
- name: Setup Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.x'
- name: Cache python venv
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@v4
if: ${{ contains(runner.name, 'GitHub Actions') }}
id: cache-venv
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@81d42b556a18b0d67455a742fcbffdeb49b3ffb0 # v2
uses: julia-actions/setup-julia@v2
with:
version: '1'
- name: Update Julia dependencies
Expand All @@ -37,14 +37,14 @@ jobs:
# Authenticate with a custom GitHub APP
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
- name: Generate token for PR
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ env.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
uses: peter-evans/create-pull-request@v6
with:
title: Julia Dependency Update
token: ${{ steps.generate-token.outputs.token }}
Expand Down

0 comments on commit 133aac1

Please sign in to comment.