Skip to content

Merge pull request #210 from astro-group-bristol/fergus/emda-fixes #69

Merge pull request #210 from astro-group-bristol/fergus/emda-fixes

Merge pull request #210 from astro-group-bristol/fergus/emda-fixes #69

Workflow file for this run

name: Auto-register
on:
push:
branches:
- main
paths:
- 'Project.toml'
- '.github/workflows/auto-register.yml'
- 'lib/GradusSpectralModels/Project.toml'
permissions:
contents: read
issues: write
pull-requests: write
jobs:
autoregister:
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.11']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- run: |
git config --global user.email "isamborg@cosroe.com"
git config --global user.name "Isamborg"
julia -e '
import Pkg
Pkg.add(url="https://github.com/GunnarFarneback/LocalRegistry.jl")
using LocalRegistry
Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/astro-group-bristol/AstroRegistry/"))
reg1 = try
register(pwd(), registry="AstroRegistry", push=false)
true
catch err
display(err)
false
end
reg2 = try
register(joinpath(pwd(), "lib/GradusSpectralModels"), registry="AstroRegistry", push=false)
true
catch err
display(err)
false
end
if !reg1 && !reg2
throw("No package registered!")
end
'
- name: Create new branch
run: |
cd ~/.julia/registries/AstroRegistry
git checkout -b "bot/gradus"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SECRET_PR_TOKEN }}
repository: "astro-group-bristol/AstroRegistry"
directory: "/home/runner/.julia/registries/AstroRegistry"
branch: "bot/gradus"
- name: Create pull request
run: |
cd ~/.julia/registries/AstroRegistry
gh pr create -B main \
--title "New Version: Gradus" \
--body "Automated pull request." \
-H "bot/gradus"
env:
GITHUB_TOKEN: ${{ secrets.SECRET_PR_TOKEN }}