fix(build): update PostgreSQL to 17 for Alpine 3.23, add Forgejo Actions CI
- Alpine 3.23 (in serversideup/php:8.4-fpm-nginx-alpine) ships pg17, not pg15 - Add .forgejo/workflows/build.yml for automated image builds on push to mapledeploy
This commit is contained in:
parent
414c8af59c
commit
8187126f77
1 changed files with 41 additions and 0 deletions
41
.forgejo/workflows/build.yml
Normal file
41
.forgejo/workflows/build.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: Build MapleDeploy Coolify Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [mapledeploy]
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- ".github/**"
|
||||
- "templates/**"
|
||||
|
||||
env:
|
||||
REGISTRY: forgejo.mapledeploy.ca
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
VERSION=$(docker run --rm -v "$PWD:/app" -w /app php:8.2-alpine3.16 php bootstrap/getVersion.php)
|
||||
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "Building version: ${VERSION}"
|
||||
|
||||
- name: Login to Forgejo registry
|
||||
run: |
|
||||
echo "${{ secrets.FORGEJO_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ github.repository_owner }} --password-stdin
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -f docker/production/Dockerfile \
|
||||
-t ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.version.outputs.VERSION }} \
|
||||
-t ${{ env.REGISTRY }}/${{ github.repository }}:latest \
|
||||
.
|
||||
|
||||
- name: Push image
|
||||
run: |
|
||||
docker push ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.version.outputs.VERSION }}
|
||||
docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest
|
||||
Loading…
Reference in a new issue