-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.42 KB
/
github-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: ➡✔ Deploy
on:
workflow_dispatch:
inputs:
bump:
type: choice
options:
- patch
- minor
- major
description: Choose your version to bump
env:
DESTINATION: "/prod/softprod/apps/openpype/openpype_software_plugins"
jobs:
build-and-publish:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: ⬆️🆙🏷️ Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: ""
default_bump: ${{ github.event.inputs.bump || 'patch' }}
- name: 📤➡️📥 Copy the Repository
run: rsync -rptl . $DESTINATION/${{ steps.tag_version.outputs.new_tag }}
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
deploy-staging:
runs-on: self-hosted
environment: staging
needs: build-and-publish
steps:
- name: 📁↔️📂Create Symbolic Links for Staging Environment
run: cd $DESTINATION && ln -sfn ${{ needs.build-and-publish.outputs.new_tag }} STAGING
deploy-production:
runs-on: self-hosted
environment: production
needs: [build-and-publish, deploy-staging]
steps:
- name: 📁↔️📂Create Symbolic Links for Prod Environment
run : cd $DESTINATION && ln -sfn ${{ needs.build-and-publish.outputs.new_tag }} PROD