diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5189f23..30d9bd7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -33,5 +33,41 @@ jobs: uses: docker/build-push-action@v6 with: context: . + platforms: linux/amd64,linux/arm64 dockerfile: Dockerfile - tags: siteworxpro/template:${{ gitea.ref_name }} \ No newline at end of file + tags: siteworxpro/template:${{ gitea.ref_name }} + + Build-Migrations: + needs: + - Build + name: 🖥️ 🔨 Build Migrations + runs-on: ubuntu-latest + steps: + - name: 🛡️ 🔒 Add Siteworx CA Certificates + run: | + curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt + update-ca-certificates + + - name: 🔑 🔐 Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: 📖 🔍 Checkout Repository Code + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: 🏗️ 🔧 Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: 🐳 🔨 Build Migrations Container + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + sbom: true + provenance: true + context: . + file: migrations.Dockerfile + tags: siteworxpro/template:${{ gitea.ref_name }}-migrations \ No newline at end of file diff --git a/README.md b/README.md index 5d1e529..734856b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Template -[![pipeline status](https://git.siteworxpro.com/rrise/php-template/badges/master/pipeline.svg)](https://git.siteworxpro.com/rrise/php-template/-/commits/master) -[![coverage report](https://git.siteworxpro.com/rrise/php-template/badges/master/coverage.svg)](https://git.siteworxpro.com/rrise/php-template/-/commits/master) -[![Latest Release](https://git.siteworxpro.com/rrise/php-template/-/badges/release.svg)](https://git.siteworxpro.com/rrise/php-template/-/releases) +![pipeline status](https://gitea.siteworxpro.com/siteworxpro/Php-Template/actions/workflows/tests.yml/badge.svg?branch=master&style=flat-square) ## Dev Environment diff --git a/migrations.Dockerfile b/migrations.Dockerfile new file mode 100644 index 0000000..c12cd91 --- /dev/null +++ b/migrations.Dockerfile @@ -0,0 +1,5 @@ +FROM siteworxpro/migrate:v4.18.3 + +ADD db/migrations /app/db/migrations + +WORKDIR /app