Debugging CI #20
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: CI | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: "3.10.8" | |
- uses: Gr1N/setup-poetry@v8 | |
name: Install poetry | |
with: | |
poetry-version: 1.7.1 | |
- name: Install python dependencies | |
run: poetry install | |
- name: Building | |
run: make build build-binary | |
- name: Check types | |
run: make lint | |
- name: Check formatting | |
run: make format | |
# Buiding the container is basically the integ test | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: create key | |
run: | | |
mkdir ./ssh/ | |
echo "${{ secrets.GITHUB_TOKEN }}" > ./ssh/id_rsa | |
- name: Build main Docker container | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
load: true | |
push: false | |
tags: booty/test${{ github.sha }} | |
# The build host is running out of disk space | |
- name: Delete docker images and cache | |
shell: bash | |
run: docker system prune -a -f | |
release: | |
name: Release | |
if: ${{ github.event_name == 'push' }} | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: "3.10.8" | |
- uses: Gr1N/setup-poetry@v8 | |
name: Install poetry | |
with: | |
poetry-version: 1.7.1 | |
- name: Install python dependencies | |
run: poetry install | |
- name: Generate exe | |
run: make build-binary | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: $(git rev-parse --short=20 ${{ github.sha }}) | |
release_name: Release $(git rev-parse --short=20 ${{ github.sha }}) | |
draft: false | |
prerelease: false | |
body: | | |
Install with pip: | |
``` | |
pip install booty-cli | |
``` | |
Or download a binary below | |
- name: PyPi Publish | |
shell: bash | |
run: poetry publish -u __token__ -p ${{ secrets.PYPI_KEY }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/booty/booty | |
asset_name: booty | |
asset_content_type: application/bin |