0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 22:22:43 -05:00
penpot/.github/workflows/publish.yml
2024-05-10 14:02:34 +02:00

73 lines
No EOL
1.8 KiB
YAML

name: Publish docker image
on:
push:
branches: [ token-studio-develop ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dockerfile: Dockerfile.backend
type: backend
- dockerfile: Dockerfile.frontend
type: frontend
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=sha,format=long,prefix=${{matrix.type}}-
images: |
ghcr.io/tokens-studio/tokens-studio-for-penpot
- name: prebuild
run: |
echo "Building ${{ matrix.type }} image"
./manage.sh build-${{matrix.type}}-bundle
mv ./bundles/${{matrix.type}} ./docker/images/bundle-${{matrix.type}}/
- name: Publish Docker images
uses: docker/build-push-action@v5
with:
context: ./docker/images
file: ./docker/images/${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
runs-on: ubuntu-latest
needs:
- "build"
steps:
- uses: actions/checkout@v4
- name: 🍍 Deploy with Gimlet
uses: gimlet-io/gimlet-artifact-shipper-action@v0.8.3
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
with:
ENV: "prod"
APP: "penpot"