From 5d6893fc6b00d517f52c1b4efc5c2a6283e3b47c Mon Sep 17 00:00:00 2001 From: Pavel Alimpiev <7024354+VaultVulp@users.noreply.github.com> Date: Fri, 9 Apr 2021 00:13:46 +0300 Subject: [PATCH] Update template * Bump apprise action * Switch to s4cmd * Lock pytest-randomly (https://github.com/python-poetry/poetry/issues/2372) * Mitigate changes to GITHUB_TOKEN --- .../.github/workflows/main.yml | 20 ++++++++++--------- .../.nomad/template-deploy.nomad | 4 ++-- {{cookiecutter.project_slug}}/pyproject.toml | 4 ++-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/main.yml b/{{cookiecutter.project_slug}}/.github/workflows/main.yml index 4f946a3..c60beb8 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/main.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/main.yml @@ -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 github-actions@github.com - name: Commit and push changes if: startsWith(github.ref, 'refs/tags/') == false @@ -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 %} @@ -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 }}/" diff --git a/{{cookiecutter.project_slug}}/.nomad/template-deploy.nomad b/{{cookiecutter.project_slug}}/.nomad/template-deploy.nomad index 050d9ac..5a79428 100644 --- a/{{cookiecutter.project_slug}}/.nomad/template-deploy.nomad +++ b/{{cookiecutter.project_slug}}/.nomad/template-deploy.nomad @@ -18,7 +18,7 @@ job "${GITHUB_REPOSITORY}" { auth { username = "puller" - password = "${GITHUB_TOKEN}" + password = "${PACKAGES_TOKEN}" } logging { @@ -45,4 +45,4 @@ job "${GITHUB_REPOSITORY}" { } } } -} \ No newline at end of file +} diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 61cc0e9..0f8e2b9 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -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" 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 %}