Extract Graph Metadata #23
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: Extract Graph Metadata | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
env: | |
CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
jobs: | |
extract-graph-metadata: | |
name: '🔄 Extract Graph Metadata' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Build and run MS Graph Docker container | |
run: | | |
docker build -t graph-permissions . | |
docker run --rm \ | |
-e CLIENT_ID=${{ env.CLIENT_ID }} \ | |
-e CLIENT_SECRET=${{ env.CLIENT_SECRET }} \ | |
-e TENANT_ID=${{ env.TENANT_ID }} \ | |
-v ${{ github.workspace }}/scripts/Export:/app/Export \ | |
graph-permissions | |
- name: Set permissions and export output | |
run: | | |
sudo mkdir -p internal/metadata | |
sudo mv scripts/Export/ExportedGraphPermissions.json internal/metadata/ | |
sudo chown -R $USER:$USER internal/metadata | |
- name: Get current time | |
id: current-time | |
run: | | |
echo "time=$(date -u '+%Y-%m-%d_%H-%M-%S')" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update MS Graph Metadata | |
title: 'Update Graph Metadata - ${{ steps.current-time.outputs.time }}' | |
body: | | |
This is an automated pull request to update graph meta data. | |
Generated on: ${{ steps.current-time.outputs.time }} | |
Please review the metadata changes and merge if everything looks correct. | |
branch: update-graph-metadata-${{ steps.current-time.outputs.time }} | |
base: main |