Skip to content

Mirror to opencode.net and update Flathub commit id #15

Mirror to opencode.net and update Flathub commit id

Mirror to opencode.net and update Flathub commit id #15

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 }}"}'