mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Updating CI to checkout current branch
This commit is contained in:
parent
5716a904e0
commit
36d7b12414
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@ -191,7 +191,16 @@ jobs:
|
|||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '16'
|
||||||
- name: Cache node_modules
|
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: save current date
|
||||||
|
run: |
|
||||||
|
# do some operation that changes a file in the git repo
|
||||||
|
date > time.txt
|
||||||
|
|
||||||
|
- name: Create code examples file
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
@ -200,13 +209,6 @@ jobs:
|
|||||||
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
|
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
|
||||||
- run: npm run create:guide
|
- run: npm run create:guide
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: save current date
|
|
||||||
run: |
|
|
||||||
# do some operation that changes a file in the git repo
|
|
||||||
date > time.txt
|
|
||||||
|
|
||||||
- name: setup git config
|
- name: setup git config
|
||||||
run: |
|
run: |
|
||||||
@ -217,6 +219,8 @@ jobs:
|
|||||||
- name: commit
|
- name: commit
|
||||||
run: |
|
run: |
|
||||||
# Stage the file, commit and push
|
# Stage the file, commit and push
|
||||||
git add time.txt
|
BRANCH=$(git branch --show-current)
|
||||||
git commit -m "new date commit"
|
git checkout "${BRANCH}"
|
||||||
git push origin master
|
git add CodeExamples.md
|
||||||
|
git commit -m "Updating CodeExamples.md"
|
||||||
|
git push
|
Loading…
x
Reference in New Issue
Block a user