From 2801dd9e523eeecece4ada64dfb3b0a1d6e4b1b4 Mon Sep 17 00:00:00 2001 From: Manu Date: Tue, 17 May 2022 16:31:27 +0400 Subject: [PATCH] Enable Docker image rebuild on every push, add PikaPods hosting option. --- .github/workflows/main.yml | 16 +++------------- README.md | 9 ++++++++- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3998215..762c2eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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) diff --git a/README.md b/README.md index 8c4fabf..eed15d3 100644 --- a/README.md +++ b/README.md @@ -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`)