[v9.2.x] Update publishing workflows to use PATs with fine-grained access control (#61267)
Update publishing workflows to use PATs with fine-grained access control (#61098)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 87ccf10ffe)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
This commit is contained in:
co-authored by
Jack Baldry
parent
dbaaf0da39
commit
f2aecc8762
@@ -17,7 +17,9 @@ jobs:
|
|||||||
uses: "actions/checkout@v3"
|
uses: "actions/checkout@v3"
|
||||||
|
|
||||||
- name: "Clone website-sync Action"
|
- name: "Clone website-sync Action"
|
||||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
# WEBSITE_SYNC_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||||
|
# It must be updated in the grafanabot GitHub account.
|
||||||
|
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_GRAFANA }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||||
|
|
||||||
- name: "Publish to website repository (next)"
|
- name: "Publish to website repository (next)"
|
||||||
uses: "./.github/actions/website-sync"
|
uses: "./.github/actions/website-sync"
|
||||||
@@ -26,6 +28,8 @@ jobs:
|
|||||||
repository: "grafana/website"
|
repository: "grafana/website"
|
||||||
branch: "master"
|
branch: "master"
|
||||||
host: "github.com"
|
host: "github.com"
|
||||||
github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}"
|
# PUBLISH_TO_WEBSITE_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||||
|
# It must be updated in the grafanabot GitHub account.
|
||||||
|
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_GRAFANA }}"
|
||||||
source_folder: "docs/sources"
|
source_folder: "docs/sources"
|
||||||
target_folder: "content/docs/grafana/next"
|
target_folder: "content/docs/grafana/next"
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ jobs:
|
|||||||
|
|
||||||
- name: "Clone website-sync Action"
|
- name: "Clone website-sync Action"
|
||||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
# WEBSITE_SYNC_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||||
|
# It must be updated in the grafanabot GitHub account.
|
||||||
|
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_GRAFANA }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||||
|
|
||||||
- name: "Publish to website repository (release)"
|
- name: "Publish to website repository (release)"
|
||||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||||
@@ -56,6 +58,8 @@ jobs:
|
|||||||
repository: "grafana/website"
|
repository: "grafana/website"
|
||||||
branch: "master"
|
branch: "master"
|
||||||
host: "github.com"
|
host: "github.com"
|
||||||
github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}"
|
# PUBLISH_TO_WEBSITE_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||||
|
# It must be updated in the grafanabot GitHub account.
|
||||||
|
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_GRAFANA }}"
|
||||||
source_folder: "docs/sources"
|
source_folder: "docs/sources"
|
||||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user