v0.8.1 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
release: | |
types: | |
- released | |
- prereleased | |
name: deploy | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3.0.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3.0.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.0.0 | |
- name: Build and Push | |
uses: docker/build-push-action@v5.1.0 | |
with: | |
context: . | |
push: true | |
target: frankenphp_prod | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} | |
ghcr.io/${{ github.repository }}:latest | |
preview: | |
needs: [image] | |
runs-on: ubuntu-latest | |
environment: | |
name: yazoo-preview | |
url: https://yazoo-preview.constructions-incongrues.net | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: yazoo-preview | |
uses: carlrygart/portainer-stack-deploy@v1.3.0 | |
with: | |
portainer-host: ${{ secrets.PORTAINER_HOST }} | |
username: ${{ secrets.PORTAINER_USERNAME }} | |
password: ${{ secrets.PORTAINER_PASSWORD }} | |
stack-name: yazoo-preview | |
stack-definition: etc/stack.yaml | |
image: ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} | |
template-variables: | | |
{ | |
"APP_ENV": "${{ env.APP_ENV }}", | |
"APP_HOSTNAME": "${{ env.APP_HOSTNAME }}", | |
"APP_SECRET": "${{ secrets.APP_SECRET }}", | |
"CADDY_EMAIL": "${{ secrets.CADDY_EMAIL }}", | |
"CADDY_EXTRA_CONFIG": "${{ env.CADDY_EXTRA_CONFIG }}", | |
"CADDY_GLOBAL_OPTIONS": "${{ env.CADDY_GLOBAL_OPTIONS }}", | |
"DIRECTUS_EMAIL": "${{ secrets.DIRECTUS_EMAIL }}", | |
"DIRECTUS_PASSWORD": "${{ secrets.DIRECTUS_PASSWORD }}", | |
"MARIADB_CHARSET": "${{ env.MARIADB_CHARSET }}", | |
"MARIADB_DATABASE": "${{ secrets.MARIADB_DATABASE }}", | |
"MARIADB_HOST": "${{ secrets.MARIADB_HOST }}", | |
"MARIADB_PASSWORD": "${{ secrets.MARIADB_PASSWORD }}", | |
"MARIADB_PORT": "${{ secrets.MARIADB_PORT }}", | |
"MARIADB_RANDOM_ROOT_PASSWORD": "true", | |
"MARIADB_USER": "${{ secrets.MARIADB_USER }}", | |
"MARIADB_VERSION": "${{ secrets.MARIADB_VERSION }}", | |
"SERVER_NAME": "http://${{ env.APP_HOSTNAME }}", | |
"STACK_NAME": "yazoo-preview", | |
"YOUTUBE_API_KEY": "${{ secrets.YOUTUBE_API_KEY }}" | |
} | |
main: | |
needs: [image] | |
runs-on: ubuntu-latest | |
environment: | |
name: yazoo-main | |
url: https://yazoo.constructions-incongrues.net | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: yazoo-main | |
uses: carlrygart/portainer-stack-deploy@v1.3.0 | |
with: | |
portainer-host: ${{ secrets.PORTAINER_HOST }} | |
username: ${{ secrets.PORTAINER_USERNAME }} | |
password: ${{ secrets.PORTAINER_PASSWORD }} | |
stack-name: yazoo-main | |
stack-definition: etc/stack.yaml | |
image: ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} | |
template-variables: | | |
{ | |
"APP_ENV": "${{ env.APP_ENV }}", | |
"APP_HOSTNAME": "${{ env.APP_HOSTNAME }}", | |
"APP_SECRET": "${{ secrets.APP_SECRET }}", | |
"CADDY_EMAIL": "${{ secrets.CADDY_EMAIL }}", | |
"CADDY_EXTRA_CONFIG": "${{ env.CADDY_EXTRA_CONFIG }}", | |
"CADDY_GLOBAL_OPTIONS": "${{ env.CADDY_GLOBAL_OPTIONS }}", | |
"DIRECTUS_EMAIL": "${{ secrets.DIRECTUS_EMAIL }}", | |
"DIRECTUS_PASSWORD": "${{ secrets.DIRECTUS_PASSWORD }}", | |
"MARIADB_CHARSET": "${{ env.MARIADB_CHARSET }}", | |
"MARIADB_DATABASE": "${{ secrets.MARIADB_DATABASE }}", | |
"MARIADB_HOST": "${{ secrets.MARIADB_HOST }}", | |
"MARIADB_PASSWORD": "${{ secrets.MARIADB_PASSWORD }}", | |
"MARIADB_PORT": "${{ secrets.MARIADB_PORT }}", | |
"MARIADB_RANDOM_ROOT_PASSWORD": "true", | |
"MARIADB_USER": "${{ secrets.MARIADB_USER }}", | |
"MARIADB_VERSION": "${{ secrets.MARIADB_VERSION }}", | |
"SERVER_NAME": "http://${{ env.APP_HOSTNAME }}", | |
"STACK_NAME": "yazoo-main", | |
"YOUTUBE_API_KEY": "${{ secrets.YOUTUBE_API_KEY }}" | |
} |