Skip to content

Commit

Permalink
Merge pull request #78 from smkent/manage-cookie
Browse files Browse the repository at this point in the history
Update project template cruft, dependencies
  • Loading branch information
smkent authored Feb 23, 2023
2 parents 270a3d0 + 3a16e63 commit b8c8149
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/smkent/cookie-python",
"commit": "4fe836a1166d38f1e6aab9fba38d7a5bfce95213",
"commit": "ae5c42761c7903b4c6238c1c6e8f91121866db89",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/actions/python-poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
python-version: ${{ inputs.python_version }}
cache: poetry

- name: 🛠️ Install project dependencies
- name: 🛠️ Install project and dependencies
shell: bash
env:
# https://github.com/python-poetry/poetry/issues/1917
Expand All @@ -35,8 +35,10 @@ runs:
run: |
poetry install
poetry lock --check
[ "$(poetry version -s)" != "0.0.0" ] \
PROJECT_VERSION=$(poetry version -s)
[ "${PROJECT_VERSION}" != "0.0.0" ] \
|| { echo "Versioning broken"; exit 1; }
echo "PROJECT_VERSION=${PROJECT_VERSION}" >> $GITHUB_ENV
- name: 🪝 Cache pre-commit hooks
uses: actions/cache@v3
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: 📡 Collect image metadata
id: meta
uses: docker/metadata-action@v4.1.1
uses: docker/metadata-action@v4.3.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -57,9 +57,11 @@ jobs:
run: poetry run poe test

- name: 📦 Build and publish container image
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v4.0.0
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"POETRY_DYNAMIC_VERSIONING_BYPASS=${{ env.PROJECT_VERSION }}"
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ repos:
- flake8-pyproject
- flake8-simplify
- pep8-naming
- repo: https://github.com/pycqa/autoflake
rev: v2.0.1
hooks:
- id: autoflake
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: ["--keep-runtime-typing"]
- repo: local
hooks:
- id: mypy
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3-alpine
ARG POETRY_DYNAMIC_VERSIONING_BYPASS="0.0.0"
ENV CRON_SCHEDULE "5 2 * * *"
ENV SMTPHOST=
ENV SAFEWAY_ACCOUNT_USERNAME=
Expand Down
116 changes: 58 additions & 58 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = ["poetry-core>=1.2.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry]
name = "safeway-coupons"
Expand Down

0 comments on commit b8c8149

Please sign in to comment.