2026-02-12 02:22:39 +00:00
|
|
|
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: |
|
2026-02-12 02:31:05 +00:00
|
|
|
VERSION=$(sed -n "s/.*'version' => '\([^']*\)'.*/\1/p" config/constants.php)
|
2026-02-12 02:22:39 +00:00
|
|
|
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
|