-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,25 +20,23 @@ jobs: | |
TEMP_BRANCH: auto/dev/test/api | ||
BASE_BRANCH: origin/develop | ||
DEST_BRANCH: api/dev | ||
CI_COMMIT_AUTHOR: 'github-actions[bot] :octocat:' | ||
CI_COMMIT_AUTHOR: 'github-actions[bot]' | ||
CI_COMMIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: checkout specific files | ||
id: checkout-files | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ env.DEST_BRANCH }} | ||
- name: set datestamp | ||
id: datestamp | ||
run: | | ||
echo "datestamp=$(git log -1 --format=%cd --date=format:%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT | ||
- name: Set current date as env variable | ||
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | ||
- name: set commit/pr message | ||
id: message | ||
run: | | ||
title="CI: automatically update ${{ env.DEST_BRANCH }} from ${{ env.BASE_BRANCH }}" | ||
body="Automated PR created by Github action on ${{ steps.datestamp.outputs.datestamp }} \ | ||
☑️ 👾 🚀 ⏳ 🔛" | ||
title="✅ CI: automatically update ${{ env.DEST_BRANCH }} from ${{ env.BASE_BRANCH }} 🔛" | ||
body="🚀 Automated PR created via Github action by ${{ env.CI_COMMIT_AUTHOR }} :octacat: on ${{ NOW }} ⏳" | ||
echo "title=$title" >> $GITHUB_OUTPUT | ||
echo "body=$body" >> $GITHUB_OUTPUT | ||
- name: create branch from destination branch and checkout files from base branch | ||
|
@@ -54,12 +52,8 @@ jobs: | |
git add -A | ||
git commit -m "${{ steps.message.outputs.title }}" | ||
git push --set-upstream origin $TEMP_BRANCH | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: create pull request | ||
run: gh pr create -B $DEST_BRANCH -H $TEMP_BRANCH --title "${{ steps.message.outputs.title }}" --body "${{ steps.message.outputs.body }}" --draft --label "automation" --reviewer "rediris" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# create_pr: | ||
# runs-on: ubuntu-latest | ||
|