Skip to content

Commit edddb25

Browse files
Merge branch 'staging' into sprint-1.18
2 parents 533ee14 + 58fc68a commit edddb25

File tree

3 files changed

+30
-12
lines changed

3 files changed

+30
-12
lines changed

.github/workflows/build-&-publish-docker-image.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,30 @@ jobs:
5555
- name: Set up Docker Buildx
5656
uses: docker/setup-buildx-action@v3
5757

58-
- name: Login to Docker Hub
59-
uses: docker/login-action@v1
60-
with:
61-
username: ${{ secrets.DOCKERHUB_USERNAME }}
62-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
58+
# - name: Login to Docker Hub
59+
# uses: docker/login-action@v1
60+
# with:
61+
# username: ${{ secrets.DOCKERHUB_USERNAME }}
62+
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
6363

6464
# - name: Get changed files using defaults
6565
# id: changed-files
6666
# uses: tj-actions/changed-files@v18.4
6767

6868
- name: Pull Build Base
69+
env:
70+
DOCKER_CONFIG: /tmp/docker-config-${{ github.run_id }}
6971
run: |
72+
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
7073
docker pull $BLOBBER_BUILD_BASE_REGISTRY:staging
7174
docker tag $BLOBBER_BUILD_BASE_REGISTRY:staging $BLOBBER_BUILDBASE
7275
7376
- name: Build Base image
7477
# if: contains(steps.changed-files.outputs.modified_files, 'docker.local/base.Dockerfile')
78+
env:
79+
DOCKER_CONFIG: /tmp/docker-config-${{ github.run_id }}
7580
run: |
81+
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
7682
SHORT_SHA=$(echo ${{ env.SHA }} | head -c 8)
7783
7884
./docker.local/bin/build.base.sh &&
@@ -82,7 +88,10 @@ jobs:
8288
docker push $BLOBBER_BUILD_BASE_REGISTRY:$TAG-$SHORT_SHA
8389
8490
- name: Build blobber
91+
env:
92+
DOCKER_CONFIG: /tmp/docker-config-${{ github.run_id }}
8593
run: |
94+
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
8695
SHORT_SHA=$(echo ${{ env.SHA }} | head -c 8)
8796
export DOCKER_IMAGE_BASE="$BLOBBER_BUILD_BASE_REGISTRY:$TAG"
8897
export DOCKER_IMAGE_SWAGGER="${BLOBBER_REGISTRY}:swagger_test"
@@ -123,11 +132,11 @@ jobs:
123132
# with:
124133
# go-version: ^1.21 # The Go version to download (if necessary) and use.
125134

126-
- name: Login to Docker Hub
127-
uses: docker/login-action@v1
128-
with:
129-
username: ${{ secrets.DOCKERHUB_USERNAME }}
130-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
135+
# - name: Login to Docker Hub
136+
# uses: docker/login-action@v1
137+
# with:
138+
# username: ${{ secrets.DOCKERHUB_USERNAME }}
139+
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
131140

132141
- name: Clone blobber
133142
uses: actions/checkout@v3
@@ -144,13 +153,19 @@ jobs:
144153
# fetch-depth: 0
145154

146155
- name: Pull Build Base
156+
env:
157+
DOCKER_CONFIG: /tmp/docker-config-${{ github.run_id }}
147158
run: |
159+
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
148160
docker pull $BLOBBER_BUILD_BASE_REGISTRY:staging
149161
docker tag $BLOBBER_BUILD_BASE_REGISTRY:staging $BLOBBER_BUILDBASE
150162
151163
- name: Build Base image
152164
# if: contains(steps.changed-files.outputs.modified_files, 'docker.local/base.Dockerfile')
165+
env:
166+
DOCKER_CONFIG: /tmp/docker-config-${{ github.run_id }}
153167
run: |
168+
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
154169
SHORT_SHA=$(echo ${{ env.SHA }} | head -c 8)
155170
156171
./docker.local/bin/build.base.sh
@@ -160,7 +175,10 @@ jobs:
160175
docker push $BLOBBER_BUILD_BASE_REGISTRY:$TAG-$SHORT_SHA
161176
162177
- name: Build validator
178+
env:
179+
DOCKER_CONFIG: /tmp/docker-config-${{ github.run_id }}
163180
run: |
181+
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
164182
SHORT_SHA=$(echo ${{ env.SHA }} | head -c 8)
165183
export DOCKER_IMAGE_BASE="$BLOBBER_BUILD_BASE_REGISTRY:$TAG"
166184
# export DOCKER_BUILD="buildx build --platform linux/amd64,linux/arm64 --push"

code/go/0chain.net/blobbercore/readmarker/authticket.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (authToken *AuthTicket) Verify(allocationObj *allocation.Allocation, client
6767
if authToken.OwnerID != allocationObj.OwnerID {
6868
return common.NewError("invalid_parameters", "Invalid auth ticket. Owner ID mismatch")
6969
}
70-
if authToken.Timestamp > (common.Now() + 2) {
70+
if authToken.Timestamp > (common.Now() + 120) {
7171
return common.NewError("invalid_parameters", "Invalid auth ticket. Timestamp in future")
7272
}
7373

code/go/0chain.net/blobbercore/reference/ref.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func GetReferenceByLookupHashForDownload(ctx context.Context, allocationID, path
375375
func GetReferencesByName(ctx context.Context, allocationID, name string) (refs []*Ref, err error) {
376376
db := datastore.GetStore().GetTransaction(ctx)
377377
err = db.Model(&Ref{}).
378-
Where("allocation_id = ? AND name LIKE ?", allocationID, "%"+name+"%").
378+
Where("allocation_id = ? AND name ILIKE ?", allocationID, "%"+name+"%").
379379
Limit(20).
380380
Find(&refs).Error
381381
if err != nil {

0 commit comments

Comments
 (0)