Skip to content

Commit

Permalink
3.12.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed Nov 20, 2024
1 parent a964fe9 commit 806db62
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 19 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/docker-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build, push to AWS ECR, and deploy
on:
push:
branches:
- chore/python-3.12

env:
AWS_REGION: ca-central-1
DOCKER_ORG: public.ecr.aws/v6b8u5o6
DOCKER_SLUG: public.ecr.aws/v6b8u5o6/notify-admin
WORKFLOW_PAT: ${{ secrets.WORKFLOW_GITHUB_PAT }}
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}

permissions:
id-token: write # This is required for requesting the OIDC JWT
contents: read # This is required for actions/checkout

jobs:
deploy:
runs-on: ubuntu-latest

name: Build and push
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install --update
aws --version
- name: Configure credentials to CDS public ECR using OIDC
uses: aws-actions/configure-aws-credentials@master
with:
role-to-assume: arn:aws:iam::283582579564:role/notification-admin-apply
role-session-name: NotifyAdminGitHubActions
aws-region: "us-east-1"
- name: Login to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@5a88a04c91d5c6f97aae0d9be790e64d9b1d47b7 # v1.7.1
with:
registry-type: public

- name: Build
run: |
docker pull $DOCKER_SLUG:latest
docker build \
--cache-from $DOCKER_SLUG:latest \
--build-arg GIT_SHA=${GITHUB_SHA::7} \
-t $DOCKER_SLUG:dev-${GITHUB_SHA::7} \
-f ci/Dockerfile .
- name: Publish
run: |
docker push $DOCKER_SLUG:dev-${GITHUB_SHA::7}
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ On OS X:

`brew install pyenv`

2. Install Python 3.12.6 or whatever is the latest
2. Install Python 3.12.7 or whatever is the latest

`pyenv install 3.12.6`
`pyenv install 3.12.7`

3. If you expect no conflicts, set `3.12.6` as you default
3. If you expect no conflicts, set `3.12.7` as you default

`pyenv global 3.12.6`
`pyenv global 3.12.7`

4. Ensure that version `3.12.6` is now the default by running
4. Ensure that version `3.12.7` is now the default by running

`python --version`

Expand All @@ -77,15 +77,15 @@ eval "$(pyenv init -)"
```
and open a new terminal.

If you are still not running Python 3.12.6 take a look here: https://github.com/pyenv/pyenv/issues/660
If you are still not running Python 3.12.7 take a look here: https://github.com/pyenv/pyenv/issues/660

5. Install `poetry`:

`pip install poetry==1.3.2`

6. Restart your terminal and make your virtual environtment:

`mkvirtualenv -p ~/.pyenv/versions/3.12.6/bin/python notifications-admin`
`mkvirtualenv -p ~/.pyenv/versions/3.12.7/bin/python notifications-admin`

7. You can now return to your environment any time by entering

Expand Down Expand Up @@ -302,15 +302,15 @@ Sur macOS :

`brew install pyenv`

1. Installez Python 3.12.6 ou la dernière version
1. Installez Python 3.12.7 ou la dernière version

`pyenv install 3.12.6`
`pyenv install 3.12.7`

3. Si vous n'attendez aucun conflit, mettez `3.12.6` comme valeur par défaut
3. Si vous n'attendez aucun conflit, mettez `3.12.7` comme valeur par défaut

`pyenv global 3.12.6`
`pyenv global 3.12.7`

4. Assurez-vous que la version 3.12.6 est maintenant la version par défaut en exécutant
4. Assurez-vous que la version 3.12.7 est maintenant la version par défaut en exécutant

`python --version`

Expand All @@ -320,7 +320,7 @@ eval "$(pyenv init --path)"
eval "$(pyenv init -)"
```
et ouvrez un nouveau terminal.
Si vous n’utilisez toujours pas Python 3.12.6, jetez un coup d’œil ici : https://github.com/pyenv/pyenv/issues/660
Si vous n’utilisez toujours pas Python 3.12.7, jetez un coup d’œil ici : https://github.com/pyenv/pyenv/issues/660

5. Installez `virtualenv` :

Expand All @@ -331,12 +331,12 @@ Si vous n’utilisez toujours pas Python 3.12.6, jetez un coup d’œil ici : ht
```
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source ~/.pyenv/versions/3.12.6/bin/virtualenvwrapper.sh
source ~/.pyenv/versions/3.12.7/bin/virtualenvwrapper.sh
```

7. Redémarrez votre terminal et créez votre environnement virtuel :

`mkvirtualenv -p ~/.pyenv/versions/3.12.6/bin/python notifications-admin`
`mkvirtualenv -p ~/.pyenv/versions/3.12.7/bin/python notifications-admin`

8. Vous pouvez maintenant retourner dans votre environnement à tout moment en entrant

Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-alpine3.20
FROM python:3.12.7-alpine3.20

ENV PYTHONDONTWRITEBYTECODE 1
ENV POETRY_VERSION="1.7.1"
Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ requires = ["poetry-core>=1.7.1"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = "~3.12.6"
python = "~3.12.7"
timeago = "1.0.16"
Flask = "2.3.3"
Flask-WTF = "1.2.1"
Expand Down

0 comments on commit 806db62

Please sign in to comment.