-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |