Skip to content

Sync Files

Sync Files #78

---
name: Sync Files
# yamllint disable rule:truthy
on:
workflow_run:
types: [ completed ]
workflows: [ CI ]
branches: [ main ]
# yamllint enable rule:truthy
jobs:
summary:
name: Workflow Run information
runs-on: ubuntu-latest
steps:
- uses: WcAServices/markdown-template-action@v1
with:
# language="shell script"
variables: >-
COMMIT_SHA="${{ github.event.workflow_run.head_sha }}"
SHORT_SHA="${COMMIT_SHA:0:7}"
# yamllint disable rule:line-length
# language="markdown"
template: |
## Workflow Run Summary
| Field | Value |
|:------------------------|:--------------------------------------------------------------------------------------------|
| Workflow | ${{ github.event.workflow_run.workflow.name }} #${{ github.event.workflow_run.run_number }} |
| Conclusion | ${{ github.event.workflow_run.conclusion }} |
| Actor | ${{ github.event.workflow_run.actor.html_url }} |
| Workflow Run ID | [${{ github.event.workflow_run.id }}](${{ github.event.workflow_run.html_url }}) |
| Workflow Run Created At | ${{ github.event.workflow_run.created_at }} |
| Workflow Run Updated At | ${{ github.event.workflow_run.updated_at }} |
| Workflow Run Head SHA | [`$SHORT_SHA`]($COMMIT_SHA) |
# yamllint enable rule:line-length
sync:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run GitHub File Sync
uses: Liber-UFPE/[email protected]
with:
GH_PAT: ${{ secrets.REPO_SYNC_PAT }}
COMMIT_EACH_FILE: false # Commit all files at once
PR_LABELS: |
file-sync