Skip to content

Only use armory sdk (#524) #16

Only use armory sdk (#524)

Only use armory sdk (#524) #16

Workflow file for this run

name: '@app/vault Production CI'
on:
push:
tags:
- vault-v*
jobs:
release:
name: Release Prod
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_ECR_ROLE_ARN }} # Organization variable
aws-region: ${{ vars.ACTIONS_ECR_REGION }} # Organization variable
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Get short SHA
id: slug
run: echo "sha7=${GITHUB_SHA::7}" >> $GITHUB_ENV
# Strip the "vault-v" prefix from the tag, so we just get the version number
- name: Get tag
id: tag
run: echo "tag=${GITHUB_REF#refs/*/vault-v}" >> $GITHUB_OUTPUT
- name: Promote image to production version tag
uses: abronin/ecr-retag-action@v1
with:
repository: armory/vault
tag: ${{ env.sha7 }}
new-tags: ${{ steps.tag.outputs.tag }}
- id: update-helm-version
name: 'Update Helm Version'
uses: ./.github/actions/update-helm-version
with:
appId: ${{ vars.NARVAL_HELM_APP_ID }}
privateKey: ${{ secrets.NARVAL_HELM_PRIVATE_KEY }}
valueFile: 'apps/charts/vault/values-prod.yaml'
propertyPath: 'image.tag'
value: ${{ steps.tag.outputs.tag }}
message: 'Update Vault Production Image Version to ${{ steps.tag.outputs.tag }}'
- name: Send Slack notification on failure
if: failure()
uses: 8398a7/action-slack@v3
with:
username: GitHub
author_name: '@app/vault Production CI release failed'
status: ${{ job.status }}
fields: message,commit,author
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}