forked from chainguard-dev/edu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautodocs-platform.yaml
More file actions
94 lines (77 loc) · 2.98 KB
/
autodocs-platform.yaml
File metadata and controls
94 lines (77 loc) · 2.98 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build Platform Docs
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
push:
branches:
- platform-docs
permissions: {}
jobs:
integrate-platform-docs:
runs-on: ubuntu-latest
if: github.repository == 'chainguard-dev/edu'
permissions:
contents: read # reads from the repo
id-token: write # federates with GCP and Sigstore
steps:
- name: 'Github Actions Runner'
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- name: 'Checkout default branch to $GITHUB_WORKSPACE dir'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: 'Setup gitsign'
uses: chainguard-dev/actions/setup-gitsign@7b18ea9960f945cabf19a84752e580829347f4ed # v1.5.4
- name: Authenticate to Google Cloud
id: auth
uses: step-security/google-github-auth@f0e5c257a9534a30b5df12f43329c1eb7b85a5be # v3.0.0
with:
service_account: "github-chainguard-academy@chainguard-academy.iam.gserviceaccount.com"
workload_identity_provider: "projects/456977358484/locations/global/workloadIdentityPools/chainguard-academy/providers/chainguard-edu"
- uses: ./.github/workflows/integrate-platform-docs
with:
project_id: "${{ secrets.PROJECT_ID }}"
storage_bucket: "${{ secrets.STORAGE_BUCKET }}"
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 16
- name: Update themes
run: git submodule update --init --recursive
- name: npm install
run: npm install
- name: npm run build
run: npm run build
- name: Set up Octo-STS
uses: chainguard-dev/octo-sts-action@6177b4481c00308b3839969c3eca88c96a91775f # v1.0.0
id: octo-sts
with:
scope: chainguard-dev/edu
identity: edu
- name: Create a PR
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
id: cpr
with:
token: ${{ steps.octo-sts.outputs.token }}
commit-message: Update Images Reference
title: "[AutoDocs] Update Platform Docs"
body: "Platform docs ${{needs.check-new-docs.outputs.latest}} autocommit"
signoff: true
labels: |
documentation
platform
automated
assignees: erikaheidi
- name: Post failure notice to Slack
uses: step-security/action-slack-notify@e04c77a65bae8b6c0373478a1cb8fd7e012637e6 # v2.3.5
if: ${{ failure() }}
env:
SLACK_ICON: http://github.com/chainguard-dev.png?size=48
SLACK_USERNAME: guardian
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: 'alerts-edu'
SLACK_COLOR: '#8E1600'
MSG_MINIMAL: 'true'
SLACK_TITLE: 'AutoDocs Platform failed - ${{ github.repository }}'
SLACK_MESSAGE: |
For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}