Bump pyinstaller from 5.13.0 to 5.13.1 #122
Workflow file for this run
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: 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 }} |