Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rediris committed Jan 8, 2025
1 parent 28a93c2 commit 097ab7b
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 097ab7b

Please sign in to comment.