Mirror to opencode.net and update Flathub commit id #15
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: Mirror to opencode.net and update Flathub commit id | |
| on: | |
| workflow_run: | |
| workflows: | |
| - "Execute tests" | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| jobs: | |
| mirror: | |
| name: Mirror code to opencode.net | |
| runs-on: ubuntu-latest | |
| if: github.event.workflow_run.conclusion == 'success' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_sha }} | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Push to GitLab mirror | |
| run: | | |
| git push --force \ | |
| "https://ransome:${{ secrets.GITLAB_PAT }}@www.opencode.net/ransome/sleek.git" \ | |
| "HEAD:refs/heads/main" \ | |
| "refs/tags/*:refs/tags/*" | |
| flathub: | |
| name: Update commit id in Flathub repo | |
| runs-on: ubuntu-latest | |
| needs: mirror | |
| steps: | |
| - name: Trigger Flathub build | |
| uses: peter-evans/repository-dispatch@v4 | |
| with: | |
| token: ${{ secrets.TRIGGER_FLATHUB_BUILD }} | |
| repository: ransome1/com.github.ransome1.sleek | |
| event-type: trigger-flathub-build | |
| client-payload: '{"commit_id": "${{ github.event.workflow_run.head_sha }}"}' |