Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change update-proto workflow auth #116

Merged
merged 2 commits into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/update-proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ jobs:
sync:
name: "Update proto"
runs-on: ubuntu-latest
permissions:
contents: write

defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
persist-credentials: false
persist-credentials: true

- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: "1.20"

Expand All @@ -40,14 +42,15 @@ jobs:
- name: Re-build proto
run: |
make install update-proto test

- name: Commit update
env:
GIT_AUTHOR_NAME: ${{ github.event.inputs.commit_author }}
GIT_AUTHOR_EMAIL: ${{ github.event.inputs.commit_author_email }}
GIT_COMMITTER_NAME: ${{ github.event.inputs.commit_author }}
GIT_COMMITTER_EMAIL: ${{ github.event.inputs.commit_author_email }}
run: |
git remote set-url origin https://x-access-token:${{ secrets.COMMANDER_DATA_TOKEN }}@github.com/${{ github.repository }}
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add .
git commit -m "${{ github.event.inputs.commit_message }}"
if [ $? -eq 0 ]; then
Expand Down
Loading