Update Opencode Commit #47
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: Update Opencode Commit | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 1-23/2 * * *" | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-opencode-commit: | |
| name: Update Opencode Commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Initialize opencode submodule | |
| run: | | |
| # .gitmodules tracks opencode with an SSH URL. Actions runners | |
| # typically lack SSH deploy keys, so force GitHub remotes to HTTPS. | |
| git config --global --add url."https://github.com/".insteadOf git@github.com: | |
| git config --global --add url."https://github.com/".insteadOf ssh://git@github.com/ | |
| git submodule sync --recursive | |
| git submodule update --init --recursive packages/opencode | |
| git submodule status --recursive | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Update opencode commit | |
| run: | | |
| ./scripts/update-opencode-commit.sh | |
| - name: Verify OCI description label | |
| run: python3 scripts/extract-oci-description.py packages/core/src/docker/Dockerfile | |
| - name: Commit and push if changed | |
| run: | | |
| if git diff --quiet; then | |
| echo "No changes to commit." | |
| exit 0 | |
| fi | |
| git add packages/core/src/docker/Dockerfile packages/opencode | |
| git commit -m "chore: update opencode commit" | |
| git push |