mirror of
https://github.com/penpot/penpot.git
synced 2026-03-12 13:27:02 +00:00
Remove all gimlet and custom workflow code
This commit is contained in:
88
.github/workflows/pr.yaml
vendored
88
.github/workflows/pr.yaml
vendored
@@ -1,88 +0,0 @@
|
||||
name: Publish docker image
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: Dockerfile.frontend
|
||||
type: pr-frontend
|
||||
name: frontend
|
||||
- dockerfile: Dockerfile.backend
|
||||
type: pr-backend
|
||||
name: backend
|
||||
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.PAT_TOKEN }}
|
||||
- name: Determine the branch name
|
||||
id: determine_branch
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
echo "branch_name=${{ github.head_ref }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Replace / with - in branch name
|
||||
id: replace_slash
|
||||
run: |
|
||||
SANITIZED_BRANCH_NAME=$(echo "${{ env.branch_name }}" | tr '/' '-')
|
||||
echo "sanitized_branch_name=${SANITIZED_BRANCH_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
tags: |
|
||||
type=raw,enable=true,prefix=${{matrix.type}}-,value=${{ env.sanitized_branch_name }}
|
||||
images: |
|
||||
ghcr.io/tokens-studio/tokens-studio-for-penpot
|
||||
- name: prebuild
|
||||
run: |
|
||||
echo "Building ${{ matrix.name }} image"
|
||||
./manage.sh build-${{matrix.name}}-bundle
|
||||
mv ./bundles/${{matrix.name}} ./docker/images/bundle-${{matrix.name}}/
|
||||
|
||||
- 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 }}
|
||||
91
.github/workflows/publish.yml
vendored
91
.github/workflows/publish.yml
vendored
@@ -1,91 +0,0 @@
|
||||
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.PAT_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"
|
||||
WAIT: "true"
|
||||
smoke:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- "deploy"
|
||||
steps:
|
||||
|
||||
- name: Check if URL can be accessed
|
||||
run: |
|
||||
URL="https://penpot.tokens.studio"
|
||||
STATUS=$(curl -o /dev/null -s -w "%{http_code}\n" $URL)
|
||||
if [ $STATUS -ne 200 ]; then
|
||||
echo "Error: Unable to access $URL. HTTP Status: $STATUS"
|
||||
exit 1
|
||||
else
|
||||
echo "Success: $URL is accessible. HTTP Status: $STATUS"
|
||||
fi
|
||||
Reference in New Issue
Block a user