-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (44 loc) · 1.65 KB
/
deps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Check Spack dependencies for updates
on:
# for manual jobs
workflow_dispatch:
# triggers at around 15:00 UTC (with some delay)
schedule:
- cron: '0 15 * * *'
jobs:
deps:
name:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: create build
run: mkdir build
- name: Checkout ports-of-call
uses: actions/checkout@v3
with:
repository: lanl/ports-of-call
path: build/ports-of-call
fetch-depth: 0
- name: copy over spack-repo/packages
run: cp -R build/ports-of-call/spack-repo/packages/* spack-repo/packages/
- name: is there a difference?
run: git diff --exit-code --compact-summary
id: no_change
- name: create branch
if: ${{ failure() && steps.no_change.conclusion == 'failure' }}
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git branch -D github-bot/update_spackages || true
git checkout -b github-bot/update_spackages
git add spack-repo
git commit -m "spack updates"
git push -f --set-upstream origin github-bot/update_spackages
- name: create pull request
if: ${{ failure() && steps.no_change.conclusion == 'failure' }}
run: gh pr create -B main -H github-bot/update_spackages --title 'Update spackages' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}