@@ -86,31 +86,44 @@ jobs:
8686 github-token : ${{ secrets.GITHUB_TOKEN }}
8787 assert : true
8888
89- deploy-dev :
90- name : Deploy backend development
91- if : ${{ github.ref == 'refs/heads/main' }}
92- needs : [build]
93- environment : Development
94- runs-on : ubuntu-latest
95- steps :
96- - name : Deploy to development
97- run : echo "Here we could do a proper deploy to Development environment"
9889
99- assert-artifacts :
100- name : Assert artifacts
101- if : ${{ github.ref == 'refs/heads/main' && always() }}
102- needs : [build, pull-request]
103- runs-on : ubuntu-latest
104- steps :
105- - name : Setup Kosli cli
106- uses : kosli-dev/setup-cli-action@v2
107- with :
108- version :
109- ${{ vars.KOSLI_CLI_VERSION }}
110-
111- - name : Assert Artifacts
112- run : |
113- set -x
114- EXIT_CODE=0
115- kosli assert artifact --fingerprint ${{ needs.build.outputs.fingerprint }} || EXIT_CODE=1
116- exit ${EXIT_CODE}
90+ deploy-development :
91+ needs : build
92+ name : Deploy to development
93+ uses : ./.github/workflows/_deploy.yml
94+ with :
95+ environment : Development
96+ version : xxx
97+ resource : dev-backend
98+ secrets : inherit
99+
100+
101+ deploy-stage :
102+ if : ${{ github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Stage') }}
103+ needs : [build,deploy-development]
104+ name : Deploy to stage
105+ uses : ./.github/workflows/_deploy.yml
106+ with :
107+ environment : Stage
108+ version : xxx
109+ resource : stage-backend
110+ secrets : inherit
111+
112+ # assert-artifacts:
113+ # name: Assert artifacts
114+ # if: ${{ github.ref == 'refs/heads/main' && always() }}
115+ # needs: [build, pull-request]
116+ # runs-on: ubuntu-latest
117+ # steps:
118+ # - name: Setup Kosli cli
119+ # uses: kosli-dev/setup-cli-action@v2
120+ # with:
121+ # version:
122+ # ${{ vars.KOSLI_CLI_VERSION }}
123+ #
124+ # - name: Assert Artifacts
125+ # run: |
126+ # set -x
127+ # EXIT_CODE=0
128+ # kosli assert artifact --fingerprint ${{ needs.build.outputs.fingerprint }} || EXIT_CODE=1
129+ # exit ${EXIT_CODE}
0 commit comments