Repository navigation
Expand file tree
/
Copy pathaccept-baselines-fix-lints.yaml
More file actions
62 lines (58 loc) · 2.18 KB
/
Copy pathaccept-baselines-fix-lints.yaml
File metadata and controls
62 lines (58 loc) · 2.18 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
name: Accept Baselines, Fix Lints, and Format
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
defaults:
run:
shell: bash
jobs:
update:
runs-on: ubuntu-latest
environment:
name: azure
deployment: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- uses: ./.github/actions/setup-go
- name: Update generated files and baselines
run: |
git config user.email "290192711+typescript-automation[bot]@users.noreply.github.com"
git config user.name "typescript-automation[bot]"
npm ci
npx hereby generate
npx hereby test || true
npx hereby baseline-accept
npx hereby lint --fix
npx hereby format
git add tsc packages tools
git diff --cached
git commit -m "Update generated files, baselines, lints, and formatting"
- uses: azure/login@a641126d1b8aa4d1fa005f4f92df94a3a4c4c906 # v3.1.0
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Create GitHub App token
id: app-token
uses: microsoft/create-github-app-token-via-key-vault@5ba0d436e9c3cac52feff4d1f2f66f9698ce4a2d # v1
with:
client-id: ${{ vars.TYPESCRIPT_AUTOMATION_GITHUB_APP_CLIENT_ID }}
key-id: ${{ vars.TYPESCRIPT_AUTOMATION_GITHUB_APP_KEY_ID }}
owner: microsoft
repositories: TypeScript
permission-contents: write
- name: Configure GitHub App token
env:
GITHUB_APP_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
basic_auth="$(node -e 'process.stdout.write(Buffer.from("x-access-token:" + process.env.GITHUB_APP_TOKEN).toString("base64"))')"
echo "::add-mask::$basic_auth"
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${basic_auth}"
- run: git push