1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 15:33:44 +01:00

Merge pull request #43 from m3nu/finalize-gh-workflow

Enable Docker image rebuild on every push, add PikaPods hosting option.
This commit is contained in:
corbpie 2022-05-19 23:45:11 +10:00 committed by GitHub
commit fec3c95c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 14 deletions

View File

@ -1,26 +1,16 @@
on:
# push:
# pull_request:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled'
required: false
default: false
push:
jobs:
build:
name: Build, push, and deploy
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup tmate debug session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
- name: Build container image
run: |
docker build \
@ -31,7 +21,7 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Push image to GitHub
- name: Push image to GHCR
if: github.ref == 'refs/heads/main'
run: |
docker push ghcr.io/cp6/my-idlers:$(echo $GITHUB_SHA | head -c7)

View File

@ -83,10 +83,17 @@ docker run \
-e DB_DATABASE=... \
-e DB_USERNAME=... \
-e DB_PASSWORD=... \
ghcr.io/m3nu/my-idlers:latest # TODO: adjust after official image is set up!
ghcr.io/cp6/my-idlers:latest
docker exec ... php artisan migrate:fresh --seed --force # Set up database one time
```
## Managed Hosting
Run with a single click on [PikaPods.com](https://www.pikapods.com/)
[![PikaPods](https://www.pikapods.com/static/run-button.svg)](https://www.pikapods.com/pods?run=my-idlers)
## API endpoints
For GET requests the header must have `Accept: application/json` and your API token (found at `/account`)