improve debpic apt repository #158
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
# Developer---->| |----> External tool (eg. gitlint) | |
# |----> makefile ---->| | |
# CI System---->| |----> External tool (eg. mypy) | |
name: debpic | |
on: | |
push: | |
branches: [ "main"] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Import GPG key | |
uses: crazy-max/[email protected] | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install debpic | |
run: | | |
echo "deb https://aidangallagher.co.uk/apt-repo/ unstable main" | sudo tee /etc/apt/sources.list.d/debpic.list | |
gpg --keyserver keyserver.ubuntu.com --recv-keys 9945693042DB91DF | |
gpg --export 9945693042DB91DF | sudo tee /etc/apt/trusted.gpg.d/debpic.gpg > /dev/null | |
sudo apt update && sudo apt install debpic | |
sudo usermod -aG docker $USER | |
newgrp docker | |
- name: Black | |
run: | | |
make -f checks.mk black | |
- name: Isort | |
run: | | |
make -f checks.mk isort | |
- name: Mypy | |
run: | | |
make -f checks.mk mypy | |
- name: Package | |
run: | | |
make -f checks.mk package | |
- name: Lintian | |
run: | | |
make -f checks.mk lintian | |
- name: Clean | |
run: | | |
make -f checks.mk clean | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Debian Package | |
path: ./built_packages/debpic*.deb | |
if-no-files-found: error | |
- name: Update Apt Repo | |
# 0if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
mkdir ~/.config/git | |
echo "[user] | |
email = [email protected] | |
name = Aidan Gallagher" >> ~/.config/git/config | |
make -f checks.mk apt-repo | |
git push origin apt-repo:apt-repo |