forked from rarestype/swift-json
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.47 KB
/
DocumentationUpload.yml
File metadata and controls
44 lines (37 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# ❣❣❣ DO NOT EDIT ❣ THIS FILE IS AUTOMATICALLY SYNCED ❣ DO NOT EDIT ❣❣❣
name: Documentation upload
permissions:
contents: write
actions: read
on:
workflow_run:
workflows: ["Documentation"]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: 🤍 Mirror workflow status 🤍
id: status
run: |
if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then
echo "The main workflow failed or was cancelled."
exit 1
fi
ALL_SUCCESS=$(gh api "${{ github.event.workflow_run.jobs_url }}" \
--jq 'all(.jobs[]; .conclusion == "success")')
if [[ "$ALL_SUCCESS" != true ]]; then
echo "not updating badge because one or more build jobs were skipped"
echo "skipped=true" >> "$GITHUB_OUTPUT"
else
echo "skipped=false" >> "$GITHUB_OUTPUT"
fi
env:
GH_TOKEN: ${{ github.token }}
- name: 🤍 Publish workflow badge 🤍
uses: rarestype/rarestbadge@v1
if: always() && steps.status.outputs.skipped != 'true'
with:
badge: Documentation/_all
title: Documentation