Skip to content

Commit

Permalink
neard-release-fetch-depth
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-near committed Jan 29, 2024
1 parent dd378c1 commit e826123
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/neard_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
- name: Checkout nearcore repository
if: ${{ github.event_name != 'workflow_dispatch'}}
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Neard binary build and upload to S3
run: ./scripts/binary_release.sh
Expand Down Expand Up @@ -67,6 +69,8 @@ jobs:
- name: Checkout nearcore repository
if: ${{ github.event_name != 'workflow_dispatch'}}
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -77,7 +81,11 @@ jobs:
- name: Build and push Docker image to Dockerhub
run: |
COMMIT=$(git rev-parse HEAD)
BRANCH=${{ github.ref_name }}
BRANCH=$(git branch --show-current)
# in case of Release triggered run, branch is empty
if [ -z "$BRANCH" ]; then
BRANCH=$(git branch -r --contains=${{ github.ref_name }} | head -n1 | cut -c3- | cut -d / -f 2)
fi
make docker-nearcore
docker tag nearcore nearprotocol/nearcore:${BRANCH}-${COMMIT}
docker tag nearcore nearprotocol/nearcore:${BRANCH}
Expand Down

0 comments on commit e826123

Please sign in to comment.