Skip to content

v0.6.0

v0.6.0 #8

Workflow file for this run

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
if: ${{ github.event.release.prerelease }}
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: ${{ secrets.YAZOO_PROD_VARS }}
main:
needs: [image]
runs-on: ubuntu-latest
if: ${{ ! github.event.release.prerelease }}
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: ${{ secrets.YAZOO_PROD_VARS }}