dependabot: push to head ref #12
Workflow file for this run
This file contains hidden or 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: dependabot | |
| on: pull_request | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| botocore: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/carapace-sh/go:1.25.4 | |
| if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'carapace-sh/carapace-aws' | |
| steps: | |
| - name: shallow clone | |
| uses: actions/checkout@v6 | |
| if: "!startsWith(github.ref, 'refs/tags/')" | |
| - name: fix git safe.directory | |
| run: git config --global --add safe.directory '*' | |
| # TODO clear old yaml files (in the code) | |
| - name: generate | |
| run: go generate ./... | |
| - name: push | |
| run: | | |
| if [ ! -z "$(git status --porcelain)" ]; then | |
| git config user.name rsteube-bot | |
| git config user.email rsteube-bot@users.noreply.github.com | |
| git add -A | |
| git commit -m "updated botocore" | |
| git push https://rsteube-bot:${GITHUB_TOKEN}@github.com/carapace-sh/carapace-aws.git HEAD:${GITHUB_HEAD_REF} | |
| fi | |
| # auto-merge: | |
| # runs-on: ubuntu-latest | |
| # if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'carapace-sh/carapace-aws' | |
| # needs: botocore | |
| # steps: | |
| # - name: approve | |
| # run: gh pr review --approve "$PR_URL" | |
| # env: | |
| # PR_URL: ${{github.event.pull_request.html_url}} | |
| # GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| # - name: merge | |
| # run: gh pr merge --auto --merge "$PR_URL" | |
| # env: | |
| # PR_URL: ${{github.event.pull_request.html_url}} | |
| # GH_TOKEN: ${{secrets.DEPENDABOT_TOKEN}} |