Skip to content

Commit 052e478

Browse files
committed
publish-techdocs: Workload identity provide pool name and SA name aren't secrets
We don't need to get these from org secrets. Let's hardcode them. If we can stop considering the bucket name a secret then we can remove the `secrets: inherit` requirement from our callers, which will be safer for them. We also add a simple integration testsuite here which can be used to validate some kinds of changes.
1 parent 0060de1 commit 052e478

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Test docs
2+
3+
Lovely stuff.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
site_name: "test-docs"
2+
3+
nav:
4+
- Home: README.md
5+
6+
plugins:
7+
- techdocs-core

.github/workflows/publish-techdocs.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ jobs:
7474
uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
7575
with:
7676
create_credentials_file: true
77-
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_POOL_PROVIDER }}
78-
service_account: ${{ secrets.BACKSTAGE_TECHDOCS_SA_EMAIL }}
77+
workload_identity_provider: projects/304398677251/locations/global/workloadIdentityPools/github/providers/github-provider
78+
service_account: github-backstage-techdocs@grafanalabs-workload-identity.iam.gserviceaccount.com
7979

8080
# Pinning until resolved https://github.com/backstage/backstage/issues/25303
8181
- name: Install techdocs-cli
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish TechDocs (test)
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- .github/publish-techdocs-testdata/**
8+
- .github/workflows/publish-techdocs.yaml
9+
- .github/workflows/test-publish-techdocs.yml
10+
- .github/workflows/test-techdocs-rewrite-relative-links.yml
11+
- techdocs-rewrite-relative-links/**
12+
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- .github/publish-techdocs-testdata/**
18+
- .github/workflows/publish-techdocs.yaml
19+
- .github/workflows/test-publish-techdocs.yml
20+
- .github/workflows/test-techdocs-rewrite-relative-links.yml
21+
- techdocs-rewrite-relative-links/**
22+
23+
concurrency:
24+
group: "${{ github.workflow }}-${{ github.ref }}"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
publish-docs:
29+
uses: ./.github/workflows/publish-techdocs.yaml
30+
secrets: inherit
31+
with:
32+
default-working-directory: ".github/publish-techdocs-testdata"
33+
kind: component
34+
name: ignored
35+
namespace: default
36+
publish: false

0 commit comments

Comments
 (0)