Skip to content

Updates for input.gacode conversion #345

Updates for input.gacode conversion

Updates for input.gacode conversion #345

Workflow file for this run

name: Generate DD
on:
pull_request:
workflow_dispatch:
env:
PTP_READ_TOKEN: ${{ secrets.PTP_READ_TOKEN }}
jobs:
make_docs:
name: Generate DD
permissions:
actions: write
contents: write
statuses: write
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: [1.x]
julia-arch: [x64]
os: [ubuntu-latest]
steps:
- name: Check for 'no_GenerateDD_action' label
uses: actions/github-script@v6
id: check_label
with:
script: |
const labels = context.payload.pull_request?.labels.map(label => label.name) || [];
if (labels.includes('no_GenerateDD_action')) {
core.warning("Skipping job execution because 'no_GenerateDD_action' label is present.");
core.setOutput('skip', 'true');
} else {
core.setOutput('skip', 'false');
}
- name: Exit if 'no_GenerateDD_action' label is present
if: ${{ steps.check_label.outputs.skip == 'true' }}
run: exit 1
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: julia-actions/setup-julia@latest
- uses: julia-actions/cache@v2
- name: "Add the FuseRegistry via Git"
run: |
julia -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")); Pkg.Registry.add("General")'
- name: Debug PTP_READ_TOKEN
run: echo "PTP_READ_TOKEN is $PTP_READ_TOKEN"
- name: Install dependencies
run: |
julia -e 'using Pkg;
Pkg.develop(PackageSpec(path=pwd()));
Pkg.develop(PackageSpec(url="https://project-torrey-pines:$(ENV["PTP_READ_TOKEN"])@github.com/ProjectTorreyPines/GenerateDD.jl.git"))
Pkg.instantiate()'
- name: Generate DD
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: |
julia -e 'import GenerateDD; GenerateDD.generate_dd()'
- name: Configure Git
run: |
git config user.email "fuse-bot@fusion.gat.com"
git config user.name "fuse bot"
git config push.autoSetupRemote true
- name: Commit and Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch
git add src/dd.jl
if [ -n "$(git status --porcelain)" ]; then
git commit -m "Update dd.jl file"
git push origin HEAD:${{ github.head_ref }}
else
echo "No changes to commit"
fi