Skip to content

Commit

Permalink
feat: restart test
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggling committed Oct 3, 2023
1 parent 19979f6 commit 796197b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/restart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Restart Test

on:
push:
branches: ["promote-test"]

permissions:
id-token: write
# contents: read # set required permissions (https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)

jobs:
set-build-secret-and-restart:
runs-on: ubuntu-latest
steps:
- name: "Az CLI login"
uses: azure/login@v1
with:
client-id: ea425507-0de4-4f5f-bac8-48cea54f7a0c #app registration Application ID or user-assigned managed identity Client ID
tenant-id: 3aa4a235-b6e2-48d5-9195-7fcf05b459b0
allow-no-subscriptions: true
- name: "Get Azure principal token for Radix"
run: |
token=$(az account get-access-token --resource 6dae42f8-4368-4678-94ff-3960e28e3630 --query=accessToken -otsv)
echo "::add-mask::$token"
echo "APP_SERVICE_ACCOUNT_TOKEN=$token" >> $GITHUB_ENV
- name: Update build secret
run: |
curl https://api.playground.radix.equinor.com/api/v1/applications/fusion-project-portal/buildsecrets/A_BUILD_SECRET \
-X PUT \
-d '{"secretValue":"new value"}' \
-H 'Authorization: Bearer ${{ env.APP_SERVICE_ACCOUNT_TOKEN }}'
- name: Restart qa env
uses: equinor/radix-github-actions@v1
with:
args: >
restart
environment
--application fusion-project-portal
--environment feature
--context production

0 comments on commit 796197b

Please sign in to comment.