Skip to content

Commit 71ee1e9

Browse files
DEVPS-49 added the check yml
1 parent 97b4e46 commit 71ee1e9

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/use_repo_secret.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: using secrets in github workflow
2+
on:
3+
workflow_dispatch:
4+
5+
run-name: using repo secrets
6+
jobs:
7+
using-github-secrets-from-workflow:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: use secret
11+
env:
12+
TEST: ${{ secrets.TEST }}
13+
run: |
14+
echo "hello Everyone"
15+
echo $TEST >> cat.txt
16+
- name: texting
17+
run: |
18+
ls -la
19+
cat cat.txt
20+
- name: azure login
21+
uses: azure/login@v1
22+
with:
23+
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
24+
- name: az cli commands
25+
env:
26+
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
27+
uses: azure/cli@v1
28+
with:
29+
azcliversion: 2.55.0
30+
inlinescript: |
31+
az account set -s "TECH-ARCHITECTS-NONPROD"
32+
az account show -o json
33+
az storage blob upload --account-name techarchitectssa --account-key $ACCESS_KEY --container-name env-secrets --file cat.txt --name myblobrepo --overwrite
34+
- name: Completed
35+
run: |
36+
echo "program completed successfully"

0 commit comments

Comments
 (0)