-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1.19 KB
/
use_org_secret.yaml
File metadata and controls
36 lines (35 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: using secrets in github workflow
on:
workflow_dispatch:
run-name: using secrets
jobs:
using-github-secrets-from-workflow:
runs-on: ubuntu-latest
steps:
- name: use secret
env:
TEST: ${{ secrets.TEST }}
run: |
echo "hello Everyone"
echo $TEST >> cat.txt
- name: texting
run: |
ls -la
cat cat.txt
- name: azure login
uses: azure/login@v1
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: az cli commands
env:
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
uses: azure/cli@v1
with:
azcliversion: 2.55.0
inlinescript: |
az account set -s "TECH-ARCHITECTS-NONPROD"
az account show -o json
az storage blob upload --account-name techarchitectssa --account-key $ACCESS_KEY --container-name env-secrets --file cat.txt --name myblob --overwrite
- name: Completed
run: |
echo "program completed successfully"