mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
34
.github/workflows/res-update-game.yml
vendored
34
.github/workflows/res-update-game.yml
vendored
@@ -115,20 +115,20 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
|
||||
steps:
|
||||
- name: Echo Authenticated User
|
||||
id: user_info
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
script: |
|
||||
const { data: user } = await github.rest.users.getAuthenticated();
|
||||
const { data: public_email } = await github.rest.users.listPublicEmailsForAuthenticatedUser();
|
||||
const username = user.name;
|
||||
const email = (public_email && public_email[0].email) || `${user.id}+${user.login}@users.noreply.github.com`
|
||||
console.log(`username: ${username}`);
|
||||
console.log(`email: ${email}`);
|
||||
core.setOutput('username', username)
|
||||
core.setOutput('email', email)
|
||||
# - name: Echo Authenticated User
|
||||
# id: user_info
|
||||
# uses: actions/github-script@v7
|
||||
# with:
|
||||
# github-token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
# script: |
|
||||
# const { data: user } = await github.rest.users.getAuthenticated();
|
||||
# const { data: public_email } = await github.rest.users.listPublicEmailsForAuthenticatedUser();
|
||||
# const username = user.name;
|
||||
# const email = (public_email && public_email[0].email) || `${user.id}+${user.login}@users.noreply.github.com`
|
||||
# console.log(`username: ${username}`);
|
||||
# console.log(`email: ${email}`);
|
||||
# core.setOutput('username', username)
|
||||
# core.setOutput('email', email)
|
||||
|
||||
- name: Checkout MAA
|
||||
uses: actions/checkout@v4
|
||||
@@ -258,8 +258,8 @@ jobs:
|
||||
run: |
|
||||
git status
|
||||
|
||||
git config user.name "${{ steps.user_info.outputs.username }}"
|
||||
git config user.email "${{ steps.user_info.outputs.email }}"
|
||||
git config user.name "$env:GITHUB_ACTOR"
|
||||
git config user.email "$env:GITHUB_ACTOR@users.noreply.github.com"
|
||||
git add .
|
||||
|
||||
$commit_msg = "${{ github.event.inputs.commit_message }}"
|
||||
@@ -283,7 +283,7 @@ jobs:
|
||||
if: steps.add_files.outputs.have_commits == 'True'
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.MISTEOWORKFLOW }}
|
||||
github_token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
|
||||
- name: Update OTA resource
|
||||
if: steps.add_files.outputs.have_commits == 'True'
|
||||
|
||||
Reference in New Issue
Block a user