-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(GITHUB): update pib template to latest
- Loading branch information
1 parent
f1fbcc0
commit 86a8fac
Showing
26 changed files
with
304 additions
and
142 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 |
---|---|---|
@@ -1,14 +1,27 @@ | ||
{ | ||
"_pib_cli_version": "0.1.2", | ||
"_template": "python-in-a-box/", | ||
"_GITHUB_ACTION_MARKDOWN_LINK_CHECK": "gaurav-nelson/github-action-markdown-link-check@1.0.12", | ||
"_GITHUB_ANCHORE_SCAN_ACTION": "anchore/scan-action@v2", | ||
"_GITHUB_CODEQL_ACTION_UPLOAD_SARIF": "github/codeql-action/upload-sarif@v1", | ||
"_GITHUB_DOCKER_BUILDX_ACTION": "docker/setup-buildx-action@v1", | ||
"_GITHUB_DOCKER_BUILD_PUSH_ACTION": "docker/build-push-action@v2", | ||
"_GITHUB_DOCKER_LOGIN_ACTION": "docker/login-action@v1", | ||
"_GITHUB_GENERATE_CHANGELOG_ACTION": "scottbrenner/generate-changelog-action@v1.3.3", | ||
"_GITHUB_GITLEAKS_ACTION": "zricethezav/gitleaks-action@v1.6.0", | ||
"_GITHUB_HADOLINT_ACTION": "hadolint/hadolint-action@v1.6.0", | ||
"_GITHUB_PUSH_ACTION": "ad-m/github-push-action@v0.6.0", | ||
"_GITHUB_YAMLLINT_ACTION": "ibiqlik/action-yamllint@v3", | ||
"_pib_cli_version": "0.1.5", | ||
"_template": "https://github.com/niall-byrne/python-in-a-box.git", | ||
"author": "Niall Byrne", | ||
"description": "Ansible based provisioner for OSX machines.", | ||
"email": "niall@niallbyrne.ca", | ||
"github_username": "osx-provisioner", | ||
"include_gitconfig": "true", | ||
"include_gitconfig_global": "true", | ||
"include_lock_file": "false", | ||
"include_ssh_keys": "true", | ||
"project_name": "Mac Maker", | ||
"project_slug": "mac_maker", | ||
"python_version": "3.8" | ||
"python_version": "3.8", | ||
"typing_support": "true" | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -o pipefail | ||
set -eo pipefail | ||
|
||
main() { | ||
|
||
|
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 |
---|---|---|
@@ -1,27 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -o pipefail | ||
set -eo pipefail | ||
|
||
main() { | ||
|
||
if [[ -n "${TEST_PYPI_API_TOKEN}" ]]; then | ||
RELEASE_TYPE="none" | ||
|
||
echo "CD_TEST=true" >> "$GITHUB_ENV" | ||
docker-compose exec -T "${PROJECT_NAME}" bash -c " \ | ||
poetry config repositories.testpypi https://test.pypi.org/legacy/ && \ | ||
poetry publish --build -r testpypi --username __token__ --password \"${TEST_PYPI_API_TOKEN}\" \ | ||
" | ||
if [[ -n "${TEST_PYPI_API_TOKEN}" ]] && [[ "${SELECTED_PYPI_REPOSITORY}" == "test" ]]; then | ||
# If there is an production pypi token, and test_release is active, use test mode | ||
RELEASE_TYPE="test" | ||
fi | ||
|
||
if [[ -n "${PYPI_API_TOKEN}" ]]; then | ||
|
||
echo "CD_ENABLED=true" >> "$GITHUB_ENV" | ||
docker-compose exec -T "${PROJECT_NAME}" bash -c " \ | ||
poetry publish --build --username __token__ --password \"${PYPI_API_TOKEN}\" \ | ||
" | ||
|
||
if [[ -n "${PYPI_API_TOKEN}" ]] && [[ "${SELECTED_PYPI_REPOSITORY}" == "production" ]]; then | ||
# If there is an production pypi token, and test_release is off, use production mode | ||
RELEASE_TYPE="production" | ||
fi | ||
|
||
case "${RELEASE_TYPE}" in | ||
"test") | ||
echo "CD_USE_TEST=true" >> "$GITHUB_ENV" | ||
docker-compose exec -T "${PROJECT_NAME}" bash -c " \ | ||
poetry config repositories.testpypi https://test.pypi.org/legacy/ && \ | ||
poetry publish --build -r testpypi --username __token__ --password \"${TEST_PYPI_API_TOKEN}\" \ | ||
" | ||
;; | ||
"production") | ||
echo "CD_USE_PRODUCTION=true" >> "$GITHUB_ENV" | ||
docker-compose exec -T "${PROJECT_NAME}" bash -c " \ | ||
poetry publish --build --username __token__ --password \"${PYPI_API_TOKEN}\" \ | ||
" | ||
;; | ||
*) | ||
echo "DEBUG: Cannot perform a test or production release with these credentials and settings." | ||
echo "DEBUG: SELECTED_PYPI_REPOSITORY was set to: \"${SELECTED_PYPI_REPOSITORY}\"" | ||
;; | ||
esac | ||
|
||
} | ||
|
||
main "$@" |
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
Oops, something went wrong.