Merge pull request #185 from tokens-studio/feat/mailslurper

Feat/mailslurper
This commit is contained in:
SorsOps 2024-06-20 02:06:50 +02:00 committed by GitHub
commit ea5dbe275e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 1218 additions and 236 deletions

View file

@ -10,8 +10,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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: 🍍 Deploy with Gimlet
uses: gimlet-io/gimlet-artifact-shipper-action@v0.8.3
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
- name: Delete image
uses: bots-house/ghcr-delete-image-action@v1.1.0
with:
owner: tokens-studio
name: tokens-studio-for-penpot
token: ${{ secrets.PAT_TOKEN }}
tag: pr-frontend-${{ env.sanitized_branch_name }}
- name: Delete image
uses: bots-house/ghcr-delete-image-action@v1.1.0
with:
owner: tokens-studio
name: tokens-studio-for-penpot
token: ${{ secrets.PAT_TOKEN }}
tag: pr-backend-${{ env.sanitized_branch_name }}

View file

@ -14,6 +14,9 @@ jobs:
- dockerfile: Dockerfile.frontend
type: pr-frontend
name: frontend
- dockerfile: Dockerfile.backend
type: pr-backend
name: backend
permissions:
contents: read
packages: write
@ -32,13 +35,27 @@ jobs:
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=sha,format=long,prefix=${{matrix.type}}-
type=raw,enable=true,prefix=${{matrix.type}}-,value=${{ env.sanitized_branch_name }}
images: |
ghcr.io/tokens-studio/tokens-studio-for-penpot
- name: prebuild
@ -67,5 +84,4 @@ jobs:
uses: gimlet-io/gimlet-artifact-shipper-action@v0.8.3
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
DEPLOY: 'true'
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}