revert: 3909a037fd for Resource Updater

[skip changelog]
This commit is contained in:
Constrat
2024-07-23 16:23:14 +02:00
parent 978dde365a
commit dec6961d9c

View File

@@ -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'