Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build test image #34

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/pr-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build test image
on:
pull_request:
types: [ labeled ]
env:
REGISTRY: harbor.clyso.com
jobs:
# build and publish docker images
docker:
if: ${{ github.event.label.name == 'test' }}
strategy:
matrix:
service:
- worker
- proxy
- agent
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REGISTRY }}/chorus/${{ matrix.service }}:${{ github.head_ref || github.ref_name }}
build-args: |
GIT_TAG=${{ github.ref_name }}
GIT_COMMIT=${{ github.sha }}
SERVICE=${{ matrix.service }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"encoding/json"
"errors"
"fmt"
"strings"

xctx "github.com/clyso/chorus/pkg/ctx"
"github.com/clyso/chorus/pkg/dom"
Expand Down Expand Up @@ -74,7 +75,7 @@ func (s *svc) HandleMigrationBucketListObj(ctx context.Context, t *asynq.Task) e
return fmt.Errorf("migration bucket list obj: list objects error %w", object.Err)
}
objectsNum++
isDir := object.Size == 0 && object.ContentType == "" && object.ETag == "" && object.LastModified.IsZero()
isDir := object.Size == 0 && strings.HasSuffix(object.Key, "/")
logger.Debug().Str(log.Object, object.Key).Str("obj_version_id", object.VersionID).Bool("is_dir", isDir).Msg("migration bucket list obj: start processing object from the list")
if isDir {
subP := p
Expand Down
Loading