Release to PPA, Release Docker #25
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: Release to PPA, Release Docker | |
on: | |
workflow_run: | |
workflows: ["Test package"] | |
types: | |
- completed | |
branches: | |
- 'main' | |
- 'master' | |
push: | |
branches: | |
- 'main' | |
- 'master' | |
paths: | |
- debian/changelog | |
- setup.cfg | |
- setup.py | |
- pyproject.toml | |
- .github/wrokflows/release_ppa.yaml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
Release-Docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set Env and GA Output | |
id: version | |
run: | | |
echo "VERSION=$(grep "^version = " pyproject.toml | grep -E -o -e "[0-9\.]+" | head -n 1)" >> $GITHUB_ENV | |
echo "VERSION=$(grep "^version = " pyproject.toml | grep -E -o -e "[0-9\.]+" | head -n 1)" >> $GITHUB_OUTPUT | |
- name: Build and push Docker image latest | |
uses: docker/build-push-action@v5 | |
with: | |
file: docker/Dockerfile | |
context: docker/ | |
push: true | |
tags: cahik/viewshed:latest-python |