Skip to content

Commit

Permalink
GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-tiloca-sics committed Jun 5, 2021
1 parent 4ed1777 commit 776c0f2
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/archive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Archive Issues and Pull Requests"

on:
schedule:
- cron: '0 0 * * 0,2,4'
repository_dispatch:
types: [archive]

jobs:
build:
name: "Archive Issues and Pull Requests"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Update Archive"
uses: martinthomson/i-d-template@v1
with:
make: archive
token: ${{ secrets.GITHUB_TOKEN }}

- name: "Update GitHub Pages"
uses: martinthomson/i-d-template@v1
with:
make: gh-archive
token: ${{ secrets.GITHUB_TOKEN }}

- name: "Save Archive"
uses: actions/upload-artifact@v2
with:
path: archive.json
58 changes: 58 additions & 0 deletions .github/workflows/ghpages.yml
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@v2

- name: "Cache Setup"
id: cache-setup
run: |
mkdir -p "$HOME"/.cache/xml2rfc
echo "::set-output name=path::$HOME/.cache/xml2rfc"
date -u "+::set-output name=date::%FT%T"
- name: "Cache References"
uses: actions/cache@v2
with:
path: |
${{ steps.cache-setup.outputs.path }}
.targets.mk
key: refcache-${{ steps.cache-setup.outputs.date }}
restore-keys: |
refcache-${{ steps.cache-setup.outputs.date }}
refcache-
- name: "Build Drafts"
uses: martinthomson/i-d-template@v1

- name: "Update GitHub Pages"
uses: martinthomson/i-d-template@v1
if: ${{ github.event_name == 'push' }}
with:
make: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}

- name: "Archive Built Drafts"
uses: actions/upload-artifact@v2
with:
path: |
draft-*.html
draft-*.txt
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
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@v2

# See https://github.com/actions/checkout/issues/290
- name: "Get Tag Annotations"
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}

- name: "Cache Setup"
id: cache-setup
run: |
mkdir -p "$HOME"/.cache/xml2rfc
echo "::set-output name=path::$HOME/.cache/xml2rfc"
date -u "+::set-output name=date::%FT%T"
- name: "Cache References"
uses: actions/cache@v2
with:
path: |
${{ steps.cache-setup.outputs.path }}
.targets.mk
key: refcache-${{ steps.date.outputs.date }}
restore-keys: |
refcache-${{ steps.date.outputs.date }}
refcache-
- name: "Build Drafts"
uses: martinthomson/i-d-template@v1

- name: "Upload to Datatracker"
uses: martinthomson/i-d-template@v1
with:
make: upload

- name: "Archive Submitted Drafts"
uses: actions/upload-artifact@v2
with:
path: "draft-*-[0-9][0-9].xml"

0 comments on commit 776c0f2

Please sign in to comment.