2024-12-28 10:40:12 -05:00
|
|
|
name: Actions
|
2024-08-03 00:15:02 -04:00
|
|
|
on:
|
2024-12-28 10:40:12 -05:00
|
|
|
pull_request:
|
2024-08-03 00:15:02 -04:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2024-08-03 00:25:19 -04:00
|
|
|
workflow_dispatch:
|
2024-08-03 00:15:02 -04:00
|
|
|
|
|
|
|
jobs:
|
2024-12-28 10:40:12 -05:00
|
|
|
images:
|
|
|
|
name: Build and Push Images
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
2024-08-03 00:15:02 -04:00
|
|
|
runs-on: docker
|
2024-12-27 23:20:58 -05:00
|
|
|
container: catthehacker/ubuntu:act-latest@sha256:89367f3c5437699c6b43fa941041725bcc77682a46f2bbe6557541e384d9cedb
|
2024-08-03 00:15:02 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-12-28 10:40:58 -05:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
2024-08-03 00:15:02 -04:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.COASTALCOMMITSTOKEN }}
|
|
|
|
- name: Login to CoastalCommits
|
|
|
|
uses: actions/docker-login@v3
|
|
|
|
with:
|
2024-08-03 00:20:33 -04:00
|
|
|
registry: www.coastalcommits.com
|
2024-10-16 11:14:33 -04:00
|
|
|
username: cswimr
|
2024-08-03 00:15:02 -04:00
|
|
|
password: ${{ secrets.COASTALCOMMITSTOKEN }}
|
2024-08-03 00:28:12 -04:00
|
|
|
- name: Build and push Downloader image
|
2024-08-03 00:15:02 -04:00
|
|
|
uses: actions/docker-build-push@v5
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: www.coastalcommits.com/galacticfactory/downloader:latest
|
2024-08-03 00:28:12 -04:00
|
|
|
- name: Restart the Downloader stack
|
2024-08-03 00:25:19 -04:00
|
|
|
run: |
|
|
|
|
echo "Sending request to Portainer to restart the Downloader stack and pull the latest image"
|
|
|
|
curl -X POST --insecure ${{ secrets.BUILDWEBHOOK }}
|
2024-12-28 10:40:12 -05:00
|
|
|
|
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: docker
|
2025-01-08 19:10:54 -05:00
|
|
|
container: www.coastalcommits.com/cswimr/actions:uv@sha256:aafbee7472a24cbd54b07fbcd5e790bcd8ba67e44471122ec577bd5353e1ef27
|
2024-12-28 10:40:12 -05:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-12-28 10:40:58 -05:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
2024-12-28 10:40:12 -05:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.COASTALCOMMITSTOKEN }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: uv sync
|
|
|
|
- name: Lint with Ruff
|
2024-12-28 10:53:04 -05:00
|
|
|
run: uv run ruff check $(git ls-files '*.py')
|
2024-12-28 10:40:12 -05:00
|
|
|
- name: Lint with Pylint
|
2024-12-28 10:53:04 -05:00
|
|
|
run: uv run pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
|