Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
* Bump apprise action
* Switch to s4cmd
* Lock pytest-randomly (python-poetry/poetry#2372)
* Mitigate changes to GITHUB_TOKEN
  • Loading branch information
VaultVulp authored Apr 8, 2021
1 parent 32f51c8 commit 5d6893f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
20 changes: 11 additions & 9 deletions {{cookiecutter.project_slug}}/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
- name: Config git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config user.name github-actions
git config user.email [email protected]
- name: Commit and push changes
if: startsWith(github.ref, 'refs/tags/') == false
Expand All @@ -69,8 +69,8 @@ jobs:
make badge
env:
MINIO_HOST: ${{ secrets.MINIO_HOST }}
MINIO_KEY: ${{ secrets.MINIO_KEY }}
MINIO_SECRET: ${{ secrets.MINIO_SECRET }}
S3_ACCESS_KEY: ${{ secrets.MINIO_KEY }}
S3_SECRET_KEY: ${{ secrets.MINIO_SECRET }}
{%- endraw %}
{%- endif %}
{%- raw %}
Expand Down Expand Up @@ -152,26 +152,28 @@ jobs:
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID }}
VAULT_SECRET_ID: ${{ secrets.VAULT_SECRET_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
LOKI_USERNAME: ${{ secrets.LOKI_USERNAME }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
LOKI_HOST: ${{ secrets.LOKI_HOST }}

- name: Inform failure
if: failure()
uses: cstuder/apprise-ga@v2.0.0
uses: cstuder/apprise-ga@v3.0.1
with:
{%- endraw %}
args: '"CI/CD" "🟧: failed to publish a new release of {{cookiecutter.project_name}}."'
title: "CI/CD"
message: "🟧: failed to publish a new release for @giftonium_bot."
{%- raw %}
env:
APPRISE_URL: "tgram://${{ secrets.APPRISE_TELEGRAM_TOKEN }}/${{ secrets.APPRISE_CHAT_ID }}/"

- name: Inform success
uses: cstuder/apprise-ga@v2.0.0
uses: cstuder/apprise-ga@v3.0.1
with:
{%- endraw %}
args: '"CI/CD" "🟩: successfully published a new release of {{cookiecutter.project_name}}."'
title: "CI/CD"
message: "🟩: successfully published a new release @giftonium_bot."
{%- raw %}
env:
APPRISE_URL: "tgram://${{ secrets.APPRISE_TELEGRAM_TOKEN }}/${{ secrets.APPRISE_CHAT_ID }}/"
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/.nomad/template-deploy.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ job "${GITHUB_REPOSITORY}" {

auth {
username = "puller"
password = "${GITHUB_TOKEN}"
password = "${PACKAGES_TOKEN}"
}

logging {
Expand All @@ -45,4 +45,4 @@ job "${GITHUB_REPOSITORY}" {
}
}
}
}
}
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ pytest-env = "^0.6.2"
pytest-deadfixtures = "^2.2.1"
pytest-html = "^2.1.1"
pytest-mock = "^3.3.1"
pytest-randomly = "^3.4.1"
pytest-randomly = "3.5.0"

This comment has been minimized.

Copy link
@jedie

jedie Apr 12, 2021

Think it's better to skip the version, e.g.:

pytest-randomly = "!=3.6.0" # https://github.com/python-poetry/poetry/issues/2372#issuecomment-812558146

pytest-sugar = "^0.9.4"
freezegun = "^1.0.0"
yapf = "^0.30.0"
{%- if cookiecutter.upload_badge_to_minio_host == 'y' %}
s3cmd = "^2.1.0"
s4cmd = "^2.1.0"
coverage-badge = "^1.0.1"
{%- endif %}

Expand Down

0 comments on commit 5d6893f

Please sign in to comment.