diff --git a/.copier-answers.yml b/.copier-answers.yml index 76c2b3a3..4b9bf49c 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v0.0.36 +_commit: v0.0.37 _src_path: gh:LabAutomationAndScreening/copier-base-template.git description: Copier template for creating Python libraries and executables python_ci_versions: diff --git a/.github/workflows/dependabot-post-update.yaml b/.github/workflows/dependabot-post-update.yaml new file mode 100644 index 00000000..620cbb11 --- /dev/null +++ b/.github/workflows/dependabot-post-update.yaml @@ -0,0 +1,38 @@ +name: Dependabot Post-Update +permissions: + contents: write # grant write access so we can push commits +on: + pull_request: + types: [opened, synchronize] + branches: + - main + +jobs: + post-update: + if: ${{ github.actor == 'dependabot[bot]' }} + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4.2.2 + with: + persist-credentials: true # (default) makes GITHUB_TOKEN available for git push + + - name: Configure Git author + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Update devcontainer hash + run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update + + - name: Commit & push changes + run: | + # only commit if there are changes + if ! git diff --quiet; then + git add . + git commit -m "chore: apply post-Dependabot script changes" + git push + else + echo "No changes to commit" + fi diff --git a/template/.github/workflows/dependabot-post-update.yaml b/template/.github/workflows/dependabot-post-update.yaml new file mode 100644 index 00000000..620cbb11 --- /dev/null +++ b/template/.github/workflows/dependabot-post-update.yaml @@ -0,0 +1,38 @@ +name: Dependabot Post-Update +permissions: + contents: write # grant write access so we can push commits +on: + pull_request: + types: [opened, synchronize] + branches: + - main + +jobs: + post-update: + if: ${{ github.actor == 'dependabot[bot]' }} + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4.2.2 + with: + persist-credentials: true # (default) makes GITHUB_TOKEN available for git push + + - name: Configure Git author + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Update devcontainer hash + run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update + + - name: Commit & push changes + run: | + # only commit if there are changes + if ! git diff --quiet; then + git add . + git commit -m "chore: apply post-Dependabot script changes" + git push + else + echo "No changes to commit" + fi