Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions for dealing with HPC-BP articles #2063

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/hpcbp-cc-pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Update HPC Best Practices webinar series curated content from ideas-productivity.org site
name: Update hpcbp-webinars-cc from ideas-productivity.org
# Update HPC Best Practices webinar series curated content article from ideas-productivity.org site
name: "HPC-BP: update curated content article from ideas-productivity.org"

on:
workflow_dispatch:
Expand Down Expand Up @@ -30,6 +30,7 @@ jobs:
# diff -c CuratedContent/hpcbp-webinars-cc.md CuratedContent/hpcbp-webinars-cc.md.bak || :

- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
title: Update HPC-BP webinar curated content
Expand All @@ -41,4 +42,16 @@ jobs:
labels: |
content: curated
content: updates


- name: Check PR results
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

- name: Merge PR
if: ${{ steps.cpr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --merge --body "Automatically merging script-generated event"
60 changes: 60 additions & 0 deletions .github/workflows/hpcbp-event-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Add new HPC Best Practices webinar event from ideas-productivity.org site
name: "HPC-BP: add new event from ideas-productivity.org"

on:
workflow_dispatch:
inputs:
event-file:
description: 'Basename of HPC-BP event on ideas-productivity.org (without extension)'
required: true
type: string

jobs:
hpcbp-cc-pr:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4

# - name: Check the file is there
# run: |
# ls -l Events/${{ inputs.event-file }}.md || :

- name: Download the new curated content article
uses: carlosperate/download-file-action@v2
with:
file-url: https://ideas-productivity.org/internal/events-hpcbp-bsswio/${{ inputs.event-file }}
location: 'Events'
file-name: ${{ inputs.event-file }}.md

# - name: Check the file is there
# run: |
# ls -l Events/${{ inputs.event-file }}.md || :

- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
title: Add new HPC-BP webinar event
branch: ${{ github.actor }}-hpcbp-new-event
branch-suffix: timestamp
assignees: ${{ github.actor }}
commit-message: "Adding new HPC-BP webinar event from the ideas-productivity.org website"
body: "Adding new HPC-BP webinar event from the ideas-productivity.org website"
labels: |
content: event

- name: Check PR results
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

- name: Merge PR
if: ${{ steps.cpr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --merge --body "Automatically merging script-generated event"

Loading