2024-08-03 00:15:02 -04:00
|
|
|
name: Docker Build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2024-08-03 00:25:19 -04:00
|
|
|
workflow_dispatch:
|
2024-08-03 00:15:02 -04:00
|
|
|
|
|
|
|
jobs:
|
2024-08-03 00:25:19 -04:00
|
|
|
Build and Push Images:
|
2024-08-03 00:15:02 -04:00
|
|
|
runs-on: docker
|
|
|
|
container: catthehacker/ubuntu:act-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
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 }}
|