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-27 23:20:58 -05:00
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
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
|
|
|
|
container: www.coastalcommits.com/cswimr/actions:uv
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.COASTALCOMMITSTOKEN }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: uv sync
|
|
|
|
- name: Lint with Ruff
|
|
|
|
run: uv run ruff check
|
|
|
|
- name: Lint with Pylint
|
|
|
|
run: uv run pylint src/
|