From 9adcf46ab2a5e0e4fe6e457328ffe09aaf3ed5b7 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 18 May 2022 12:45:07 +0300 Subject: [PATCH] Checking out current branch with actions/checkout@v2 --- .github/workflows/ci.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78070f59..7e59b44d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,13 +192,12 @@ jobs: with: node-version: '16' - - name: checkout + - name: checkout current branch uses: actions/checkout@v2 - - - name: save current date - run: | - # do some operation that changes a file in the git repo - date > time.txt + with: + repository: 'oceanprotocol/ocean.js' + path: 'ocean.js' + ref: ${GITHUB_HEAD_REF#refs/heads/} - name: Create code examples file uses: actions/cache@v2 @@ -219,9 +218,7 @@ jobs: - name: commit run: | # Stage the file, commit and push - BRANCH=${GITHUB_HEAD_REF#refs/heads/} - echo ${BRANCH} - git checkout origin/${BRANCH} + git status git add CodeExamples.md git commit -m "Updating CodeExamples.md" git push \ No newline at end of file