generated from riscv-admin/template-group-admin
-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 2ecd44d
Showing
5 changed files
with
509 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,56 @@ | ||
name: Build Charter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, reopened, edited] | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
prerelease: | ||
description: 'Tag as a pre-release?' | ||
required: false | ||
type: boolean | ||
default: true | ||
draft: | ||
description: 'Create release as a draft?' | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Container Image | ||
run: docker build -t riscv-charter ./ | ||
|
||
- name: Build Newsletter | ||
run: docker run --rm -v ${PWD}:/build -w /build riscv-charter:latest | ||
|
||
- name: Upload PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Charter PDF | ||
path: ${{ github.workspace }}/*.pdf | ||
|
||
# Create Release | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ github.workspace }}/*.pdf | ||
tag_name: charter-${{ github.run_number }} | ||
name: Charter ${{ github.run_number }} | ||
draft: ${{ github.event.inputs.draft }} | ||
prerelease: ${{ github.event.inputs.prerelease }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GHTOKEN }} | ||
if: github.event_name == 'workflow_dispatch' | ||
# This condition ensures this step only runs for workflow_dispatch events. |
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,12 @@ | ||
# Use the riscvintl/riscv-docs-base-container-image as a base image | ||
FROM riscvintl/riscv-docs-base-container-image:latest | ||
|
||
# Metadata as a label | ||
LABEL maintainer="Rafael Sene [email protected]" | ||
|
||
# Set the working directory in the container to /build | ||
WORKDIR /build | ||
|
||
# Run asciidoctor-pdf when the container launches | ||
CMD sh -c "asciidoctor-pdf -o charter-$(date +%Y%m%d).pdf \ | ||
-a compress ./charter.adoc" |
Oops, something went wrong.