mirror of https://github.com/kdl-org/kdl.git
Setup repository for draft-marchan-kdl2 using https://github.com/martinthomson/i-d-template
This commit is contained in:
parent
8f544eda60
commit
d344e4147d
|
|
@ -0,0 +1,101 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: martinthomson/i-d-template:latest
|
||||
resource_class: small
|
||||
working_directory: ~/draft
|
||||
|
||||
steps:
|
||||
- run:
|
||||
name: "Print Configuration"
|
||||
command: |
|
||||
xml2rfc --version
|
||||
gem list -q kramdown-rfc
|
||||
echo -n 'mmark '; mmark --version
|
||||
|
||||
- restore_cache:
|
||||
name: "Restoring cache - Git"
|
||||
keys:
|
||||
- v2-cache-git-{{ .Branch }}-{{ .Revision }}
|
||||
- v2-cache-git-{{ .Branch }}
|
||||
- v2-cache-git-
|
||||
|
||||
- restore_cache:
|
||||
name: "Restoring cache - References"
|
||||
keys:
|
||||
- v1-cache-references-{{ epoch }}
|
||||
- v1-cache-references-
|
||||
|
||||
# Workaround for https://discuss.circleci.com/t/22437
|
||||
- run:
|
||||
name: Tag Checkout
|
||||
command: |
|
||||
if [ -n "$CIRCLE_TAG" ] && [ -d .git ]; then
|
||||
remote=$(echo "$CIRCLE_REPOSITORY_URL" | \
|
||||
sed -e 's,/^git.github.com:,https://github.com/,')
|
||||
git fetch -f "$remote" "refs/tags/$CIRCLE_TAG:refs/tags/$CIRCLE_TAG" || \
|
||||
(echo 'Removing .git cache for tag build'; rm -rf .git)
|
||||
fi
|
||||
|
||||
- checkout
|
||||
|
||||
# Build txt and html versions of drafts
|
||||
- run:
|
||||
name: "Build Drafts"
|
||||
command: make
|
||||
|
||||
# Update editor's copy on gh-pages
|
||||
- run:
|
||||
name: "Update GitHub Pages"
|
||||
command: |
|
||||
if [ "${CIRCLE_TAG#draft-}" == "$CIRCLE_TAG" ]; then
|
||||
make gh-pages
|
||||
fi
|
||||
|
||||
# For tagged builds, upload to the datatracker.
|
||||
- deploy:
|
||||
name: "Upload to Datatracker"
|
||||
command: |
|
||||
if [ "${CIRCLE_TAG#draft-}" != "$CIRCLE_TAG" ]; then
|
||||
make upload
|
||||
fi
|
||||
|
||||
# Archive GitHub Issues
|
||||
- run:
|
||||
name: "Archive GitHub Issues"
|
||||
command: "make archive || make archive DISABLE_ARCHIVE_FETCH=true && make gh-archive"
|
||||
|
||||
# Create and store artifacts
|
||||
- run:
|
||||
name: "Create Artifacts"
|
||||
command: "make artifacts CI_ARTIFACTS=/tmp/artifacts"
|
||||
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts
|
||||
|
||||
- run:
|
||||
name: "Prepare for Caching"
|
||||
command: "git reflog expire --expire=now --all && git gc --prune=now"
|
||||
|
||||
- save_cache:
|
||||
name: "Saving Cache - Git"
|
||||
key: v2-cache-git-{{ .Branch }}-{{ .Revision }}
|
||||
paths:
|
||||
- ~/draft/.git
|
||||
|
||||
- save_cache:
|
||||
name: "Saving Cache - Drafts"
|
||||
key: v1-cache-references-{{ epoch }}
|
||||
paths:
|
||||
- ~/.cache/xml2rfc
|
||||
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- build:
|
||||
filters:
|
||||
tags:
|
||||
only: /.*?/
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# See http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*.{md,xml,org}]
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Automatically generated CODEOWNERS
|
||||
# Regenerate with `make update-codeowners`
|
||||
draft-marchan-kdl2.md
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
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
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 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@v4
|
||||
with:
|
||||
path: archive.json
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
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
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: "Setup"
|
||||
id: setup
|
||||
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
|
||||
|
||||
- name: "Caching"
|
||||
uses: actions/cache@v4
|
||||
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@v4
|
||||
with:
|
||||
path: |
|
||||
draft-*.html
|
||||
draft-*.txt
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
name: "Publish New Draft Version"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "draft-*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
email:
|
||||
description: "Submitter email"
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Publish New Draft Version"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 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@v4
|
||||
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
|
||||
env:
|
||||
UPLOAD_EMAIL: ${{ inputs.email }}
|
||||
|
||||
- name: "Archive Submitted Drafts"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: "versioned/draft-*-[0-9][0-9].*"
|
||||
|
|
@ -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@v4
|
||||
|
||||
- name: "Update Generated Files"
|
||||
uses: martinthomson/i-d-template@v1
|
||||
with:
|
||||
make: update-files
|
||||
token: ${{ github.token }}
|
||||
|
||||
- name: "Push Update"
|
||||
run: git push
|
||||
|
|
@ -1,2 +1,23 @@
|
|||
/target
|
||||
Cargo.lock
|
||||
*.html
|
||||
*.pdf
|
||||
*.redxml
|
||||
*.swp
|
||||
*.txt
|
||||
*.upload
|
||||
*~
|
||||
.tags
|
||||
/*-[0-9][0-9].xml
|
||||
/.*.mk
|
||||
/.gems/
|
||||
/.refcache
|
||||
/.venv/
|
||||
/.vscode/
|
||||
/lib
|
||||
/node_modules/
|
||||
/versioned/
|
||||
Gemfile.lock
|
||||
archive.json
|
||||
draft-marchan-kdl2.xml
|
||||
package-lock.json
|
||||
report.xml
|
||||
!requirements.txt
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
<note title="Discussion Venues" removeInRFC="true">
|
||||
<t>Source for this draft and an issue tracker can be found at
|
||||
<eref target="https://github.com/jyasskin/kdl"/>.</t>
|
||||
</note>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Contributing
|
||||
|
||||
This repository relates to activities in the Internet Engineering Task Force
|
||||
([IETF](https://www.ietf.org/)). All material in this repository is considered
|
||||
Contributions to the IETF Standards Process, as defined in the intellectual
|
||||
property policies of IETF currently designated as
|
||||
[BCP 78](https://www.rfc-editor.org/info/bcp78),
|
||||
[BCP 79](https://www.rfc-editor.org/info/bcp79) and the
|
||||
[IETF Trust Legal Provisions (TLP) Relating to IETF Documents](http://trustee.ietf.org/trust-legal-provisions.html).
|
||||
|
||||
Any edit, commit, pull request, issue, comment or other change made to this
|
||||
repository constitutes Contributions to the IETF Standards Process
|
||||
(https://www.ietf.org/).
|
||||
|
||||
You agree to comply with all applicable IETF policies and procedures, including,
|
||||
BCP 78, 79, the TLP, and the TLP rules regarding code components (e.g. being
|
||||
subject to a Simplified BSD License) in Contributions.
|
||||
|
|
@ -1 +1,4 @@
|
|||
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
||||
# License
|
||||
|
||||
See the
|
||||
[guidelines for contributions](https://github.com/jyasskin/kdl/blob/main/CONTRIBUTING.md).
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
LIBDIR := lib
|
||||
include $(LIBDIR)/main.mk
|
||||
|
||||
$(LIBDIR)/main.mk:
|
||||
ifneq (,$(shell grep "path *= *$(LIBDIR)" .gitmodules 2>/dev/null))
|
||||
git submodule sync
|
||||
git submodule update --init
|
||||
else
|
||||
ifneq (,$(wildcard $(ID_TEMPLATE_HOME)))
|
||||
ln -s "$(ID_TEMPLATE_HOME)" $(LIBDIR)
|
||||
else
|
||||
git clone -q --depth 10 -b main \
|
||||
https://github.com/martinthomson/i-d-template $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
Loading…
Reference in New Issue