Skip to content

update

update #29

Workflow file for this run

name: publish
on:
push:
tags:
- v*.*.*
env:
FORCE_COLOR: 1
jobs:
publish-pypi:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install secator
uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
- name: Install secator build addon
run: secator install addons build
- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Build PyPI package
run: secator u build --version ${VERSION}
- name: Publish PyPI package
run: secator u publish
env:
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
publish-docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install secator
uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Build Docker image (full)
run: docker build -t freelabz/secator:${VERSION} .
- name: Build Docker image (lite)
run: docker build -t freelabz/secator:${VERSION}-lite --build-arg flavor=lite .
- name: Tag image with 'latest'
run: docker tag freelabz/secator:${VERSION} freelabz/secator:latest
if: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') }}
- name: Push Docker images
run: |
docker push freelabz/secator:${VERSION}-lite
docker push freelabz/secator:${VERSION}
- name: Push Docker image 'latest'
run: docker push freelabz/secator:latest
if: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') }}