-
Notifications
You must be signed in to change notification settings - Fork 3
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
428757d
commit 78a5bee
Showing
9 changed files
with
793 additions
and
53 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
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,47 @@ | ||
name: Dependabot | ||
on: pull_request_target | ||
permissions: | ||
pull-requests: write | ||
issues: write | ||
repository-projects: write | ||
contents: write | ||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
# Checkout with full history for to allow compare with base branch | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
- uses: FranzDiebold/github-env-vars-action@v2 | ||
- name: Install CI/CD tools | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install continuous-delivery-scripts | ||
python -m pip list | ||
- name: Dependabot metadata | ||
id: dependabot-metadata | ||
uses: dependabot/[email protected] | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Add a label | ||
run: gh pr edit "$PR_URL" --add-label "bot" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: Approve the PR | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: Assert news | ||
run: cd-assert-news -b ${CI_ACTION_REF_NAME} | ||
env: | ||
GIT_TOKEN: ${{ secrets.GIT_SECRET }} | ||
- name: Auto-merge the PR | ||
run: gh pr merge --auto --squash --body "Dependency upgrade $PR_URL" --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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,61 @@ | ||
name: GitHub Release | ||
|
||
env: | ||
go_version: "1.16" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_type: | ||
description: | ||
"Enter type of release to perform (i.e. development, beta, release):" | ||
required: true | ||
jobs: | ||
release: | ||
name: Carry out a release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- name: Determine dependencies | ||
# Note | ||
# The below code generates a pip requirements file from the pipenv development requirements (also obtaining the | ||
# normal dependencies from setup.py). | ||
# This code also forces the system to install latest tools as the ones present on the CI system may be too old | ||
# for the process to go through properly. | ||
run: | | ||
python -m pip install --upgrade pip wheel setuptools | ||
python -m pip install flake8 pipenv pytest | ||
python -m pipenv lock --dev -r --pre > dev-requirements.txt | ||
- uses: FranzDiebold/github-env-vars-action@v2 | ||
- name: Load Python Dependencies from cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.python_cache_ubuntu_path }} | ||
key: linux-pip-3-continuous-delivery-scripts | ||
- name: Install dependencies | ||
# Note | ||
# As a virtual machine is already being used, pipenv | ||
# is superfluous and eliminating pipenv in CI reduces overhead and reduce complexity, while retaining a single | ||
# location for development dependencies. | ||
run: | | ||
python -m pip install -r dev-requirements.txt | ||
python -m pip list | ||
- name: Generate SPDX documents | ||
run: | | ||
mkdir -p ./spdx-tmp | ||
cd-generate-spdx --output-dir ./spdx-tmp | ||
- name: Generate Documentation | ||
run: | | ||
cd-generate-docs --output_dir $(cd-get-config --key DOCUMENTATION_PRODUCTION_OUTPUT_PATH) | ||
- name: Add copyright/licence notice. | ||
run: | | ||
cd-license-files | ||
- name: Tag and release | ||
run: cd-tag-and-release -b ${CI_ACTION_REF_NAME} -t ${{ github.event.inputs.release_type }} -vv | ||
env: | ||
# Using a specific token because GITHUB_TOKEN is not available https://github.com/marketplace/actions/workflow-dispatch#token | ||
GIT_TOKEN: ${{ secrets.GIT_SECRET }} | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
IGNORE_PYPI_TEST_UPLOAD: true |
Oops, something went wrong.