-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41b1c39
commit 745b271
Showing
6 changed files
with
285 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This project is in the public domain. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "Archive Issues and Pull Requests" | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0,2,4' | ||
repository_dispatch: | ||
types: [archive] | ||
workflow_dispatch: | ||
inputs: | ||
archive_full: | ||
description: 'Recreate the archive from scratch' | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
name: "Archive Issues and Pull Requests" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
# Note: No caching for this build! | ||
|
||
- name: "Update Archive" | ||
uses: martinthomson/i-d-template@v1 | ||
env: | ||
ARCHIVE_FULL: ${{ inputs.archive_full }} | ||
with: | ||
make: archive | ||
token: ${{ github.token }} | ||
|
||
- name: "Update GitHub Pages" | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
make: gh-archive | ||
token: ${{ github.token }} | ||
|
||
- name: "Save Archive" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: archive.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: "Update Editor's Copy" | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- README.md | ||
- CONTRIBUTING.md | ||
- LICENSE.md | ||
- .gitignore | ||
pull_request: | ||
paths-ignore: | ||
- README.md | ||
- CONTRIBUTING.md | ||
- LICENSE.md | ||
- .gitignore | ||
|
||
jobs: | ||
build: | ||
name: "Update Editor's Copy" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Setup" | ||
id: setup | ||
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" | ||
|
||
- name: "Caching" | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.refcache | ||
.venv | ||
.gems | ||
node_modules | ||
.targets.mk | ||
key: i-d-${{ steps.setup.outputs.date }} | ||
restore-keys: i-d- | ||
|
||
- name: "Build Drafts" | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
token: ${{ github.token }} | ||
|
||
- name: "Update GitHub Pages" | ||
uses: martinthomson/i-d-template@v1 | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
make: gh-pages | ||
token: ${{ github.token }} | ||
|
||
- name: "Archive Built Drafts" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: | | ||
draft-*.html | ||
draft-*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "Publish New Draft Version" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "draft-*" | ||
|
||
jobs: | ||
build: | ||
name: "Publish New Draft Version" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
# See https://github.com/actions/checkout/issues/290 | ||
- name: "Get Tag Annotations" | ||
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} | ||
|
||
- name: "Setup" | ||
id: setup | ||
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" | ||
|
||
- name: "Caching" | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.refcache | ||
.venv | ||
.gems | ||
node_modules | ||
.targets.mk | ||
key: i-d-${{ steps.setup.outputs.date }} | ||
restore-keys: i-d- | ||
|
||
- name: "Build Drafts" | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
token: ${{ github.token }} | ||
|
||
- name: "Upload to Datatracker" | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
make: upload | ||
|
||
- name: "Archive Submitted Drafts" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: "versioned/draft-*-[0-9][0-9].*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: "Perform Initial Repository Setup" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
setup: | ||
name: "Setup Repository" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Precondition Check" | ||
id: pre | ||
run: | | ||
if ! ls draft-* rfc* 2>/dev/null | grep -qv draft-ietf-pquip-pqc-engineers.md; then | ||
echo "=============================================================" | ||
echo "Skipping setup for the first commit." | ||
echo | ||
echo "Rename draft-ietf-pquip-pqc-engineers.md to start using this repository:" | ||
echo | ||
echo " https://github.com/${{github.repository}}/edit/main/draft-ietf-pquip-pqc-engineers.md" | ||
echo | ||
echo "Change the name of the file and its title." | ||
echo "Commit the changes to the 'main' branch." | ||
echo | ||
echo "=============================================================" | ||
echo "skip=true" >>"$GITHUB_OUTPUT" | ||
elif [ ! -f draft-ietf-pquip-pqc-engineers.md -a -f Makefile ]; then | ||
echo "=============================================================" | ||
echo "Skipping setup for an already-configured repository." | ||
echo | ||
echo "Delete .github/workflows/setup.yml to avoid running this action:" | ||
echo | ||
echo " https://github.com/${{github.repository}}/delete/main/.github/workflows/setup.yml" | ||
echo | ||
echo "=============================================================" | ||
echo "skip=true" >>"$GITHUB_OUTPUT" | ||
fi | ||
- name: "Git Config" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "I-D Bot" | ||
- name: "Update Draft Name" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
run: | | ||
for i in draft-*; do | ||
if [ "$(head -1 "$i")" = "---" ]; then | ||
sed -i -e '2,/^---/{/^###/,/^###/d | ||
s|^docname: .*|docname: '"${i%.md}-latest"'| | ||
s|^ fullname: Your Name Here| fullname: "'"$(git show -q --format='format:%aN' @)"'"| | ||
s|^ email: your\.email@example\.com| email: "'"$(git show -q --format='format:%aE' @)"'"| | ||
}' "$i" | ||
fi | ||
sed -i -e "s/draft-todo-yourname-protocol-latest/${i%.md}-latest/g" "$i" | ||
git add "$i" | ||
done | ||
if [ -n "$(git status --porcelain draft-*)" ]; then | ||
git commit -m "Update draft labels" draft-* | ||
fi | ||
- name: "Cleanup" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
run: | | ||
git rm -rf .github/workflows/setup.yml README.md | ||
git commit -m "Remove setup files" | ||
- name: "Clone the i-d-template Repo" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
run: | | ||
git clone --depth=1 https://github.com/martinthomson/i-d-template lib | ||
- name: "Run i-d-template Setup" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
make: setup | ||
|
||
- name: "Update Venue Information" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
make: update-venue | ||
|
||
- name: "Update GitHub Pages" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
make: gh-pages | ||
|
||
- name: "Push Changes" | ||
if: ${{ steps.pre.outputs.skip != 'true' }} | ||
run: | | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: "Update Generated Files" | ||
# This rule is not run automatically. | ||
# It can be run manually to update all of the files that are part | ||
# of the template, specifically: | ||
# - README.md | ||
# - CONTRIBUTING.md | ||
# - .note.xml | ||
# - .github/CODEOWNERS | ||
# - Makefile | ||
# | ||
# | ||
# This might be useful if you have: | ||
# - added, removed, or renamed drafts (including after adoption) | ||
# - added, removed, or changed draft editors | ||
# - changed the title of drafts | ||
# | ||
# Note that this removes any customizations you have made to | ||
# the affected files. | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
name: "Update Files" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Update Generated Files" | ||
uses: martinthomson/i-d-template@v1 | ||
with: | ||
make: update-files | ||
token: ${{ github.token }} | ||
|
||
- name: "Push Update" | ||
run: git push |