Skip to content

Commit

Permalink
Merge pull request #73 from rsksmart/testDevportalAutoImp
Browse files Browse the repository at this point in the history
feat/ adding timestamp to branchname
  • Loading branch information
SebasGuaquetaRSK authored Dec 17, 2024
2 parents b52b2e8 + 3f5d083 commit 5a320c0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/devportal-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.DEVPORTAL_DOCS_UPDATE_TOKEN }}
run: |
TIMESTAMP=$(date +'%Y%m%d-%H%M%S')
BRANCH_NAME="update-from-btc-transaction-solidity-helper-${TIMESTAMP}"
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
git clone https://github.com/rsksmart/devportal.git
cd devportal
git checkout -b update-from-btc-transaction-solidity-helper || git checkout update-from-btc-transaction-solidity-helper
git checkout -b ${BRANCH_NAME} || git checkout ${BRANCH_NAME}
cd ..
# Step 2: Transform Each File and Copy to Devportal Repository
Expand Down Expand Up @@ -66,7 +70,7 @@ jobs:
git commit -m "Automated update from repository"
# Configure the remote URL with the token for authentication
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/rsksmart/devportal.git
git push -f origin update-from-btc-transaction-solidity-helper
git push -f origin ${BRANCH_NAME}
# Step 4: Create a Pull Request in the Devportal Repository
- name: Create Pull Request
Expand All @@ -80,4 +84,4 @@ jobs:
-H "Authorization: Bearer ${{ secrets.DEVPORTAL_DOCS_UPDATE_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/rsksmart/devportal/pulls \
-d "{\"title\":\"${PR_TITLE}\",\"body\":\"This PR updates the Devportal documentation with the latest changes from the original repository.\",\"head\":\"update-from-btc-transaction-solidity-helper\",\"base\":\"main\"}"
-d "{\"title\":\"Btc-transaction-solidity-helper automated update of documentation ${TIMESTAMP}\",\"body\":\"This PR updates the Devportal documentation with the latest changes from the original repository.\",\"head\":\"${BRANCH_NAME}\",\"base\":\"main\"}"

0 comments on commit 5a320c0

Please sign in to comment.