Skip to content

create and deploy 6122627e18d3a5538685d96c039013ea5c0b84f4 #34

create and deploy 6122627e18d3a5538685d96c039013ea5c0b84f4

create and deploy 6122627e18d3a5538685d96c039013ea5c0b84f4 #34

name: Create and deploy a new release
run-name: create and deploy ${{ github.sha }}
on:
push:
branches:
- main
jobs:
trigger-gitlab-pipeline:
runs-on: ubuntu-latest
env:
GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }}
steps:
- name: configure environment
shell: bash
run: |
echo "REPO_PUBLIC_URL=${{ github.server_url }}/${{ github.repository }}.git" >> $GITHUB_ENV
echo "SCAFFOLD_DIR=scaffold" >> $GITHUB_ENV
echo "BRANCH_NAME=main" >> $GITHUB_ENV
- name: clone scaffold repository
shell: bash
run: git clone --depth 1 https://oauth2:$GITLAB_API_TOKEN@${{ vars.SCAFFOLD_REPO_PUBLIC_URL }} ${{ env.SCAFFOLD_DIR }}
- name: trigger Gitlab CI/CD pipeline
shell: bash
run: |
RELEASE_VERSION="${GITHUB_SHA:0:8}"
./scripts/gitlab-ci-pipeline.sh ${{ env.REPO_PUBLIC_URL }} ${{ vars.APP_NAME }} $RELEASE_VERSION $BRANCH_NAME
working-directory: ${{ env.SCAFFOLD_DIR }}