Skip to content

Bump python-telegram-bot from 13.15 to 20.6 #127

Bump python-telegram-bot from 13.15 to 20.6

Bump python-telegram-bot from 13.15 to 20.6 #127

Workflow file for this run

name: Releases
on:
push:
branches:
- main
tags:
- v*
pull_request:
env:
PYTHON_VERSION: '3.10'
POETRY_VERSION: 1.5.1
jobs:
docker-images:
name: Build Docker Images
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: ${{ github.event_name == 'push' }}
matrix:
include:
- base: slim
suffix: ''
file: ./docker/Dockerfile
context: ./
- base: alpine
suffix: -alpine
file: ./docker/Dockerfile.alpine
context: ./
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
install-dependencies: false
- name: Export requirements.txt
run: poetry export -f requirements.txt --output requirements.txt
- uses: docker/metadata-action@v4
id: meta
with:
images: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}
flavor: |
suffix=${{ matrix.suffix }},onlatest=true
tags: |
type=edge,branch=main,suffix=${{ matrix.suffix }}
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
id: buildx
- uses: docker/build-push-action@v3
with:
context: ${{ matrix.context }}
file: ${{ matrix.file }}
platforms: linux/arm64, linux/amd64, linux/arm/v7, linux/386, linux/arm/v6
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: peter-evans/dockerhub-description@v3
if: github.event_name == 'push'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}
short-description: ${{ github.event.repository.description }}
readme-filepath: ./docker/DOCKER_README.md
releases:
name: Build Release Files
runs-on: ${{ matrix.os }}
strategy:
fail-fast: ${{ github.event_name == 'push' }}
matrix:
include:
- os: ubuntu-latest
tag: linux
- os: windows-latest
tag: win
- os: macos-latest
tag: macos
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
without: test
- name: Run PyInstaller
run: |
poetry run pyinstaller scanner.spec
cp ./config.sample.ini ./dist/config.ini
cp ./README.md ./dist/README.md
cp ./LICENSE ./dist/LICENSE
./dist/scanner -v
- name: Make filename for archive
id: filename
shell: bash
run: echo "FILENAME=scanner-${{ github.ref_name }}-${{ matrix.tag }}.zip" | sed -r 's,/,-,g' >> $GITHUB_OUTPUT
- name: Zip files (linux/macos)
if: matrix.tag == 'linux' || matrix.tag == 'macos'
run: zip -j ./${{ steps.filename.outputs.FILENAME }} ./dist/*
- name: Zip files (win)
if: matrix.tag == 'win'
run: Compress-Archive ./dist/* ./${{ steps.filename.outputs.FILENAME }}
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: releases
path: ./${{ steps.filename.outputs.FILENAME }}
- name: Add archive to release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
files: ./${{ steps.filename.outputs.FILENAME }}