Skip to content

Rename refrepl to replace_reference to improve clarity (#9) #5

Rename refrepl to replace_reference to improve clarity (#9)

Rename refrepl to replace_reference to improve clarity (#9) #5

Workflow file for this run

name: Test, Build and Push Docker Image
"on":
push:
branches: ["main"]
tags:
- "v*"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
env:
test_dir: tests
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run Python unit tests
run: python -m unittest discover -s ${{ env.test_dir }}
docker:
runs-on: ubuntu-latest
permissions:
packages: write
needs:
- "test"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=ref,event=branch
type=ref,event=pr
# git short commit
type=sha
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}