Dependencies #1
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: "Dependencies" | |
on: | |
schedule: | |
- cron: '30 1 1,15 * *' | |
workflow_dispatch: | |
env: | |
# | |
# Branch Name | |
# As part of the Dependencies workflow we create a temporary branch | |
# this value can be changed if this name is already reserved for other systems | |
# within the repository. | |
# | |
# Default: automated-dependencies | |
# | |
branch: "automated-dependencies" | |
jobs: | |
dependencies: | |
name: "Automated Dependencies" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Configure" | |
run: | | |
git config user.name github-actions | |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
- name: "Switch" | |
run: | | |
git checkout -b ${{ env.branch }} | |
- name: "Dependencies" | |
run: | | |
./scripts/Dependencies.ps1 | |
shell: pwsh | |
- name: "Updates" | |
run: ./scripts/UpdateRequiredModules.ps1 | |
shell: pwsh | |
- name: "Execute" | |
run: | | |
FILE=/tmp/updates.json | |
if [ -f "$FILE" ]; then | |
git add src/AzOps.psd1 | |
git commit -m 'Update AzOps.psd1' | |
git push origin ${{ env.branch }} | |
gh pr create --base 'main' --head ${{ env.branch }} --title 'Bump Dependencies' --body '' --label 'dependencies' | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |