From 5f0c8dfa555cd7e7f700adba3ac7270dbf47880e Mon Sep 17 00:00:00 2001 From: EunBae Gong Date: Sun, 24 Mar 2024 00:39:21 +0900 Subject: [PATCH] ci: add merged event --- .github/workflows/publish.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e4286c8..044d208 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -65,3 +65,19 @@ jobs: - uses: actions/checkout@v3 with: persist-credentials: false + + merge: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Merge publish to main + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git checkout main + git merge --no-ff --no-edit publish + git push origin main