Merge branch 'main' into promote-test #11
Workflow file for this run
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
name: promote | |
on: | |
push: | |
branches: | |
- promote-test | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
id-token: write | |
jobs: | |
test: | |
name: Realease | |
runs-on: ubuntu-latest | |
environment: production | |
env: | |
TENANT_ID: 3aa4a235-b6e2-48d5-9195-7fcf05b459b0 | |
CLIENT_ID: 02f3484c-cad0-4d1d-853d-3a9e604b38f3 | |
steps: | |
- name: "Az CLI login" # uses federated auth | |
uses: azure/login@v1 | |
with: | |
tenant-id: ${{env.TENANT_ID}} | |
client-id: ${{env.CLIENT_ID}} | |
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: "Get application information for fusion-project-portal" | |
id: get_application_info_api | |
uses: equinor/radix-github-actions@master | |
with: | |
args: > | |
get application | |
--application fusion-project-portal | |
- name: Install jq | |
uses: dcarbone/[email protected] | |
with: | |
version: "1.6" | |
- name: "Get active deployments" | |
id: get_active_deployments | |
run: | | |
activeDeploymentApi=$(echo '${{steps.get_application_info_api.outputs.result}}' | jq -r '.environments | .[] | select(.name=="test") | .activeDeployment.name') | |
echo "activeDeploymentApi=$activeDeploymentApi" >> "$GITHUB_OUTPUT" | |
- name: "Promote fusion-project-portal in Radix from test to feature" | |
uses: equinor/radix-github-actions@master | |
with: | |
args: > | |
create job | |
promote | |
-a fusion-project-portal | |
-d Promote Project Portal | |
-f | |
--from-environment test | |
--to-environment feature | |
--deployment ${{ steps.get_active_deployments.outputs.activeDeploymentApi }} |