github: update ghcr authentication #31
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
name: Push Latest | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
save-container: | |
strategy: | |
matrix: | |
py_version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
name: create and save container | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- run: docker pull ghcr.io/micro-fan/python:latest || true | |
- run: > | |
PY_VERSION=python${{ matrix.py_version }} | |
TAG_NAME=latest-py${{ matrix.py_version }} | |
make push_ghcr_image | |
default-container: | |
name: assemble default container | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- run: docker pull ghcr.io/micro-fan/python:latest || true | |
- run: > | |
PY_VERSION=python3.12 | |
TAG_NAME=latest | |
make push_ghcr_image |