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:
commit
fec3c95c02
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -1,26 +1,16 @@
|
|||||||
on:
|
on:
|
||||||
# push:
|
push:
|
||||||
# pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
debug_enabled:
|
|
||||||
description: 'Run the build with tmate debugging enabled'
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build, push, and deploy
|
name: Build, push, and deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Build container image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
@ -31,7 +21,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
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'
|
if: github.ref == 'refs/heads/main'
|
||||||
run: |
|
run: |
|
||||||
docker push ghcr.io/cp6/my-idlers:$(echo $GITHUB_SHA | head -c7)
|
docker push ghcr.io/cp6/my-idlers:$(echo $GITHUB_SHA | head -c7)
|
||||||
|
@ -83,10 +83,17 @@ docker run \
|
|||||||
-e DB_DATABASE=... \
|
-e DB_DATABASE=... \
|
||||||
-e DB_USERNAME=... \
|
-e DB_USERNAME=... \
|
||||||
-e DB_PASSWORD=... \
|
-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
|
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
|
## API endpoints
|
||||||
|
|
||||||
For GET requests the header must have `Accept: application/json` and your API token (found at `/account`)
|
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