Enable Docker image rebuild on every push, add PikaPods hosting option.
This commit is contained in:
parent
2a6087b843
commit
2801dd9e52
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
|
@ -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)
|
||||
|
|
|
@ -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`)
|
||||
|
|
Loading…
Reference in New Issue
Block a user