chore(deps): update ghcr.io/walnuts1018/walnuts.dev docker tag to v5a… #1494
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: Namespace Auto Generation | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: switch to auto-gen-namespace branch | |
run: git switch -c auto-gen-namespace | |
- name: setup-go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "scripts/infrautil/go.mod" | |
cache-dependency-path: "scripts/infrautil/go.sum" | |
- name: make namespace | |
run: | | |
make namespace | |
- name: check diff | |
id: check-diff | |
run: | | |
echo "diff=$(git diff --name-only | wc -l)" >> $GITHUB_OUTPUT | |
- uses: actions/create-github-app-token@v1 | |
id: generate_token | |
if: steps.check-diff.outputs.diff > 0 | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.PRIVATE_KEY }} | |
- name: Set env | |
if: steps.check-diff.outputs.diff > 0 | |
run: | | |
echo "GH_TOKEN=${{ steps.generate_token.outputs.token }}" >> $GITHUB_ENV | |
- name: push | |
if: steps.check-diff.outputs.diff > 0 | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "auto-gen-namespace" | |
git push origin auto-gen-namespace --force | |
- name: create PR | |
if: steps.check-diff.outputs.diff > 0 | |
run: | | |
gh pr create --title "auto-gen-namespace" --body "auto-gen-namespace" --base main --head auto-gen-namespace | |
gh pr merge --merge |