Skip to content

Commit

Permalink
Create PR for newsletter CI (#1468)
Browse files Browse the repository at this point in the history
* Create PR for newsletter CI

* Add mamaicode
  • Loading branch information
AngelOnFira authored Apr 9, 2024
1 parent 7c7ea93 commit b53cf47
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/create_newsletter_scaffold.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ -z "${NEWSLETTER_COUNTER}" ]]; then
exit 1
fi

cp newsletter-template.md index.md
cp .github/newsletter-template.md index.md
sed -i "s/{{\s*NEWSLETTER_MONTH\s*}}/${NEWSLETTER_MONTH}/g" index.md
sed -i "s/{{\s*NEWSLETTER_YEAR\s*}}/${NEWSLETTER_YEAR}/g" index.md
sed -i "s/{{\s*NEWSLETTER_DEADLINE\s*}}/${NEWSLETTER_DEADLINE}/g" index.md
Expand Down
File renamed without changes.
15 changes: 10 additions & 5 deletions .github/workflows/create-newsletter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,20 @@ jobs:
echo "NEWSLETTER_COUNTER=$(( ( ( $(date +'%Y') - 2024 ) * 12 + $(date +'%m') - 2 ) + 50 ))" >> $GITHUB_ENV
- name: Create newsletter scaffold
run: ./.github/create_newsletter_scaffold.sh
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
- name: Commit and create pull request
uses: peter-evans/create-pull-request@v3
with:
message: "Create newsletter N${{ env.NEWSLETTER_COUNTER }} for ${{ env.NEWSLETTER_MONTH }} ${{ env.NEWSLETTER_YEAR }}"
push: "origin HEAD:source"
commit-message: "Create newsletter N${{ env.NEWSLETTER_COUNTER }} for ${{ env.NEWSLETTER_MONTH }} ${{ env.NEWSLETTER_YEAR }}"
branch: "start-newsletter-${{ env.NEWSLETTER_COUNTER }}"
title: "Newsletter N${{ env.NEWSLETTER_COUNTER }} for ${{ env.NEWSLETTER_MONTH }} ${{ env.NEWSLETTER_YEAR }}"
body: "This PR adds the initial newsletter source file for ${{ env.NEWSLETTER_MONTH }} ${{ env.NEWSLETTER_YEAR }}."
assignees: |
AngelOnFira
janhohenheim
mamaicode
- name: Create tracking issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/newsletter-issue-template.md

0 comments on commit b53cf47

Please sign in to comment.