Skip to content

Commit bebbcd7

Browse files
authored
Merge pull request #3 from MathewBiddle/update-cookie
action to sync with cookiecutter
2 parents e5e8749 + 40d5c61 commit bebbcd7

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.cookiecutter.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"hackathon_repo_name": "hackathon-template-github",
3+
"hackathon_full_name": "My Hackathon Name",
4+
"hackathon_short_description": "My short description",
5+
"start_date": "2024-12-01",
6+
"end_date": "2024-12-01",
7+
"organization_github": "your_org",
8+
"lead_instructor_name": "Instructor Name",
9+
"lead_instructor_affiliation": "Lead Instructor Affiliation",
10+
"lead_instructor_github": "username",
11+
"lead_instructor_orcid": "XXXX-XXXX-XXXX-XXXX"
12+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Pull from cookiecutter
2+
3+
on:
4+
workflow_dispatch:
5+
# schedule:
6+
7+
jobs:
8+
checkout:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install cookiecutter
13+
run: python -m pip install --user cookiecutter
14+
- name: Build Template
15+
run: cookiecutter gh:mgrover1/hackathon-template-cookiecutter --output-dir .. --config-file .cookiecutter.json --no-input --overwrite-if-exists
16+
- name: Create Pull Request
17+
if: github.ref == 'refs/heads/main'
18+
id: cpr
19+
uses: peter-evans/create-pull-request@v7
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
commit-message: "Latest data: ${{ env.NOW }}"
23+
branch: update-webpage
24+
delete-branch: true
25+
title: "[metrics-ci] webpage auto-update"
26+
body: |
27+
Cookiecutter auto-udpate.
28+
labels: |
29+
Bot
30+
assignees: |
31+
MathewBiddle
32+
reviewers: |
33+
MathewBiddle
34+
35+
- name: Check outputs
36+
if: ${{ steps.cpr.outputs.pull-request-number }}
37+
run: |
38+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
39+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)