-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add create/deploy release Github workflow (#305)
* add github workflows to create and deploy new releases * update workflow: switch to main branch
- Loading branch information
1 parent
691e825
commit 3a6d17d
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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 | ||
- 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 | ||
working-directory: ${{ env.SCAFFOLD_DIR }} |