Build container automatically (#18)

Signed-off-by: Ryan McCue <me@ryanmccue.info>
This commit is contained in:
Ryan McCue 2025-07-31 20:33:52 +01:00 committed by GitHub
parent d9fb2e9863
commit ac27aef40b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 25 deletions

30
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Build and push container
on:
push:
branches: [ main ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-24.04-arm
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: bin/build.sh

View file

@ -1,25 +0,0 @@
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Composer dependencies
uses: php-actions/composer@v6
- name: Run deploy script
run: bin/deploy.sh --apply
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEPLOY_HOST: ${{ secrets.PRODUCTION_DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.PRODUCTION_DEPLOY_USER }}
DEPLOY_PASS: ${{ secrets.PRODUCTION_DEPLOY_PASS }}