-
Notifications
You must be signed in to change notification settings - Fork 130
50 lines (44 loc) · 1.43 KB
/
env-release-synapse.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
name: Release to Environment Synapse
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to Deploy'
required: true
type: choice
options:
- beta
- prod
version:
description: 'Version to be Published'
required: true
type: string
jobs:
env-release:
runs-on: ubuntu-latest
steps:
- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
logout: true
- name: Setup Environment
run: |
echo "BOTNAME=Test-at-Scale Synapse Promoted: Version ${ENVIRONMENT} to ${VERSION}" >> $GITHUB_ENV
if [ ${ENVIRONMENT} == "prod" ] ; then
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
else
echo "IMAGE_TAG=${ENVIRONMENT}" >> $GITHUB_ENV
fi
env:
ENVIRONMENT: ${{ github.event.inputs.environment }}
VERSION: ${{ github.event.inputs.version }}
- name: Promote Docker Image
run: |
docker pull lambdatest/synapse:${VERSION}
docker tag lambdatest/synapse:${VERSION} lambdatest/synapse:${{ env.IMAGE_TAG }}
docker push lambdatest/synapse:${{ env.IMAGE_TAG }}
env:
ENVIRONMENT: ${{ github.event.inputs.environment }}
VERSION: ${{ github.event.inputs.version }}