Login in workflow #8
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
on: | ||
workflow_call: | ||
jobs: | ||
test-upload: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Prepare Test files | ||
run: | | ||
mkdir test_dir | ||
echo "foo" > test_dir/test.txt | ||
echo "bar" > test_dir/test2.txt | ||
# https://github.com/Azure/login?tab=readme-ov-file#login-with-openid-connect-oidc-recommended | ||
- name: Azure Login | ||
uses: azure/login@v2 | ||
with: | ||
client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
- name: Upload results to blob store using az | ||
id: upload-directory | ||
uses: RMI-PACTA/actions/actions/azure/azcopy-copy@azcopy-actions | ||
with: | ||
source: 'test_dir/' | ||
destination: https://pactadatadev.blob.core.windows.net/ghactions-workflow-transition-monitor-results-reports/alpha/path/to/file | ||
flags: | | ||
--recursive | ||
- name: Download results to blob store using az | ||
id: download-directory | ||
uses: RMI-PACTA/actions/actions/azure/azcopy-copy@azcopy-actions | ||
with: | ||
destination: 'foo/' | ||
source: https://pactadatadev.blob.core.windows.net/ghactions-workflow-transition-monitor-results-reports/alpha/ | ||
flags: | | ||
--recursive | ||
- name: show files | ||
run: | | ||
ls -laR foo |