-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1735 from oscal-compass/develop
chore: Trestle release
- Loading branch information
Showing
66 changed files
with
974 additions
and
236 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 |
---|---|---|
|
@@ -9,6 +9,8 @@ on: | |
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
set-versions: | ||
runs-on: ubuntu-latest | ||
|
@@ -110,11 +112,16 @@ jobs: | |
url: https://pypi.org/p/compliance-trestle | ||
if: github.ref == 'refs/heads/main' && github.repository == 'oscal-compass/compliance-trestle' | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
token: ${{ secrets.ADMIN_PAT }} | ||
token: ${{ steps.app-token.outputs.token }} | ||
- name: Set up Python ${{ needs.set-versions.outputs.max }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -126,9 +133,9 @@ jobs: | |
# This action uses Python Semantic Release v8 | ||
- name: Python Semantic Release | ||
id: release | ||
uses: python-semantic-release/[email protected].0 | ||
uses: python-semantic-release/[email protected].8 | ||
with: | ||
github_token: ${{ secrets.ADMIN_PAT }} | ||
github_token: ${{ steps.app-token.outputs.token }} | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
@@ -137,10 +144,10 @@ jobs: | |
if: steps.release.outputs.released == 'true' | ||
|
||
- name: Publish package distributions to GitHub Releases | ||
uses: python-semantic-release/[email protected].0 | ||
uses: python-semantic-release/[email protected].9 | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
github_token: ${{ secrets.ADMIN_PAT }} | ||
github_token: ${{ steps.app-token.outputs.token }} | ||
|
||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
|
@@ -151,11 +158,16 @@ jobs: | |
# Temporary hack: allow develop as well as master to deploy docs. | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
token: ${{ secrets.ADMIN_PAT }} | ||
token: ${{ steps.app-token.outputs.token }} | ||
- name: Set up Python ${{ needs.set-versions.outputs.max }} | ||
uses: actions/setup-python@v5 | ||
# This is deliberately not using a custom credential as it relies on native github actions token to have push rights. | ||
|
@@ -178,16 +190,31 @@ jobs: | |
cancel-in-progress: true | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
ref: main | ||
fetch-depth: 0 | ||
token: ${{ secrets.ADMIN_PAT }} | ||
token: ${{ steps.app-token.outputs.token }} | ||
- name: Get GitHub App User ID | ||
id: get-user-id | ||
run: echo "user-id=$(gh api "/users/${{ env.SLUG }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | ||
env: | ||
GH_TOKEN: ${{ steps.app-token.outputs.token }} | ||
SLUG: ${{ steps.app-token.outputs.app-slug }} | ||
- name: Configure Git | ||
run: | | ||
git config user.name "Vikas Agarwal" | ||
git config user.email "<>" | ||
git config --global user.name '${{ env.SLUG }}[bot]' | ||
git config --global user.email '${{ env.ID }}+${{ env.SLUG }}[bot]@users.noreply.github.com' | ||
env: | ||
SLUG: ${{ steps.app-token.outputs.app-slug }} | ||
ID: ${{ steps.get-user-id.outputs.user-id }} | ||
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | ||
- name: Merge Main to Develop | ||
run: | | ||
git checkout develop | ||
|
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
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,38 @@ | ||
name: Stale Issues and PRs | ||
on: | ||
schedule: | ||
- cron: '17 1 * * *' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
env: | ||
STALE_WARNING_DAYS: 90 | ||
STALE_CLOSURE_DAYS: 30 | ||
steps: | ||
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9 | ||
with: | ||
stale-issue-label: stale | ||
exempt-issue-labels: good-first-issue, help-wanted, exempt-from-stale | ||
stale-issue-message: > | ||
This issue has been automatically marked as stale because it has not had activity within ${{ env.STALE_WARNING_DAYS }} days. | ||
It will be automatically closed if no further activity occurs within ${{ env.STALE_CLOSURE_DAYS }} days. | ||
close-issue-message: > | ||
This issue has been automatically closed due to inactivity. | ||
days-before-issue-stale: ${{ env.STALE_WARNING_DAYS }} | ||
days-before-issue-close: ${{ env.STALE_CLOSURE_DAYS }} | ||
stale-pr-label: stale | ||
stale-pr-message: > | ||
This pull request has been automatically marked as stale because it has not had activity within ${{ env.STALE_WARNING_DAYS }} days. | ||
It will be automatically closed if no further activity occurs within ${{ env.STALE_CLOSURE_DAYS }} days. | ||
close-pr-message: > | ||
This pull request has been automatically closed due to inactivity. Please reopen if this PR is still being worked on. | ||
days-before-pr-stale: ${{ env.STALE_WARNING_DAYS }} | ||
days-before-pr-close: ${{ env.STALE_CLOSURE_DAYS }} |
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
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
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
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
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
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,2 @@ | ||
::: trestle.core.jinja.base | ||
handler: python |
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,2 @@ | ||
::: trestle.core.jinja.ext | ||
handler: python |
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,2 @@ | ||
::: trestle.core.jinja.filters | ||
handler: python |
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
::: trestle.core.jinja.tags | ||
handler: python |
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,2 @@ | ||
::: trestle.core.plugins | ||
handler: python |
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
Oops, something went wrong.