Skip to content

Commit

Permalink
[Track-320] Update Deploy workflow to tag prod backups (#2484)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolkamps1 authored Dec 17, 2024
1 parent 883d6cf commit d1f6e61
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,24 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set Timestamp
id: timestamp
run: echo "::set-output name=ts::$(date +'%Y-%m-%d_%H-%M-%S')"

- name: Login Openshift
shell: bash
run: |
oc login --server=${{secrets.OPENSHIFT_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT_SA_TOKEN}}
- name: Backup Current Prod
if: ${{ github.event.inputs.environment == 'prod' }}
shell: bash
run: |
oc project ${{ secrets.OPENSHIFT_REPOSITORY }}-tools
TIMESTAMP=${{ steps.timestamp.outputs.ts }}
oc tag epictrack-api:prod epictrack-api:prod-backup-${TIMESTAMP}
oc tag epictrack-web:prod epictrack-web:prod-backup-${TIMESTAMP}
- name: Tag Images and Rollout
shell: bash
run: |
Expand Down

0 comments on commit d1f6e61

Please sign in to comment.