Skip to content

melosys-eessi 23.340.110110 #62

melosys-eessi 23.340.110110

melosys-eessi 23.340.110110 #62

Workflow file for this run

name: deploy-prod
on:
release:
types: [published]
permissions:
contents: write
jobs:
deploy-prod:
runs-on: ubuntu-latest
environment: prod-fss:teammelosys
steps:
- uses: actions/[email protected]
- name: get release tag
run: |
APPLICATION=$(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)
IMAGE=docker.pkg.github.com/$GITHUB_REPOSITORY/$APPLICATION:$GITHUB_SHA
echo "IMAGE=${IMAGE}" >> $GITHUB_ENV
echo $IMAGE
- name: deploy new Unleash Apikey to ${{github.event.inputs.environment}}
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-fss
RESOURCE: nais/unleash-apitoken.yml
VARS: nais/vars-prod.json
- name: Deploy
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-fss
RESOURCE: nais/nais.yml
VARS: nais/vars-prod.json
- name: post-production
uses: navikt/digihot-deploy/actions/post-production@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
echo "COMMIT_MSG=$(git log --format=%s -n 1)" >> $GITHUB_ENV
- name: Slack Notification (deploy success)
if: success()
uses: rtCamp/[email protected]
env:
SLACK_COLOR: good
SLACK_USERNAME: Github Actions
SLACK_ICON: https://github.com/github.png?size=48
SLACK_TITLE: ':clap: melosys-eessi ble deployet til prod :rocket:'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: ${{ env.COMMIT_MSG }}
- name: Slack Notification (deploy failure)
if: failure()
uses: rtCamp/[email protected]
env:
SLACK_COLOR: danger
SLACK_USERNAME: Github Actions
SLACK_ICON: https://github.com/github.png?size=48
SLACK_TITLE: ':crying_cat_face: melosys-eessi kunne ikke deployes til prod!'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: ${{ env.COMMIT_MSG }}