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

Use BOT_USER (eclipse-symphoy-bot) to checkout, commit, push changes in release pipeline #247

Merged
merged 2 commits into from
May 7, 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
19 changes: 17 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,33 @@ name: Release

on:
workflow_dispatch:
permissions: write-all
permissions:
contents: write
packages: write
env:
msftcoderdjw marked this conversation as resolved.
Show resolved Hide resolved
ContainerRegistry: "ghcr.io"
ContainerRegistryRepo: "ghcr.io/eclipse-symphony"
BOT_USER_NAME: eclipse-symphoy-bot
BOT_EMAIL_ID: symphony-bot@eclipse.org
IMAGE_NAME: ${{ github.repository }}

# Two users are used in this pipeline
# BOT_USER_NAME (eclipse-symphoy-bot) / secrets.BOT_GITHUB_TOKEN is used to checkout/commit/push the changes to the repository
# github.repository_owner / secrets.GITHUB_TOKEN is used to login to the docker registry and helm registry and to create the release
jobs:
build:
if: github.repository == 'eclipse-symphony/symphony' && (github.actor == 'chgennar' || github.actor == 'juancooldude' || github.actor == 'Haishi2016' || github.actor == 'nonsocode' || github.actor == 'msftcoderdjw' || github.actor == 'TonyXiaofeng' || github.actor == 'iwangjintian')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: Git config
run: |
git config user.name ${{ env.BOT_USER_NAME }}
git config user.email ${{ env.BOT_EMAIL_ID }}

- name: Install dependencies
run: |
Expand Down Expand Up @@ -150,7 +165,7 @@ jobs:
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
branch: main

- name: Create Release
Expand Down
Loading