Skip to content

chore(deps): update dependency @types/node to v14.18.63 (#1148) #959

chore(deps): update dependency @types/node to v14.18.63 (#1148)

chore(deps): update dependency @types/node to v14.18.63 (#1148) #959

name: Merge develop into master
on:
push:
branches:
- develop
jobs:
HasLabel:
name: Check if the push contains the label "merge-into-master :crown:"
runs-on: ubuntu-latest
outputs:
HAS_LABEL: ${{ steps.save-has-label.outputs.HAS_LABEL }}
steps:
- name: Check labels
id: check_labels
uses: shioyang/check-pr-labels-on-push-action@ac674473adfe36c785eee0926fee822ac9e2bf38 # v1.0.9
with:
github-token: ${{ secrets.SONIA_BOT_GH_TOKEN }}
labels: '["merge-into-master :crown:"]'
- name: Save has label result
id: save-has-label
run: echo 'HAS_LABEL=${{ steps.check_labels.outputs.result }}' >> $GITHUB_OUTPUT
- name: Label present
if: steps.check_labels.outputs.result == 'true'
run: echo 'The label "merge-into-master :crown:" is present'
- name: Label missing
if: steps.check_labels.outputs.result == 'false'
run: echo 'The label "merge-into-master :crown:" is missing'
PR:
runs-on: ubuntu-latest
needs: [HasLabel]
steps:
- name: Checkout master
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
ref: master
- name: Reset branch
run: |
git fetch origin develop:develop
git reset --hard develop
- name: Show has label state
run: echo 'Has label? ${{ needs.HasLabel.outputs.HAS_LABEL }}'
- name: Should create the PR
if: needs.HasLabel.outputs.HAS_LABEL == 'true'
run: echo 'The PR should be created'
- name: Should not create the PR
if: needs.HasLabel.outputs.HAS_LABEL == 'false'
run: echo 'The PR should not be created'
- name: Create PR from develop to master
if: needs.HasLabel.outputs.HAS_LABEL == 'true'
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # v4
with:
token: ${{ secrets.SONIA_BOT_GH_TOKEN }}
title: 'chore(master): merge develop into master'
branch: feature/merge-develop-into-master
assignees: C0ZEN
labels: 'auto-merge :ok:'
commit-message: 'chore(master): merge develop into master'
committer: ${{ secrets.GIT_COMMITTER_NAME }} <${{ secrets.GIT_COMMITTER_EMAIL }}>
author: ${{ secrets.GIT_AUTHOR_NAME }} <${{ secrets.GIT_AUTHOR_EMAIL }}>
body: |
[~merge-into-master :crown:]: https://img.shields.io/badge/-merge%20into%20master-303952.svg
:tada: This PR was generated after pushing into develop with the label [![label: merge-into-master :crown:][~merge-into-master :crown:]](https://github.com/Sonia-corporation/stale/labels/merge-into-master%20%3Acrown%3A) :tada:
Your **@Sonia-corporation-bot** :rocket: