Skip to content

Commit 0cfef76

Browse files
committed
Merge branch 'master' into feature/platform-selector
2 parents 6e0bf7b + 3299344 commit 0cfef76

1,018 files changed

Lines changed: 276 additions & 323480 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.circleci/config.yml‎

Lines changed: 0 additions & 65 deletions
This file was deleted.

‎.github/.markdown-lint.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MD024:
2+
allow_different_nesting: true
3+
siblings_only: true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug encountered while using image-syncer
4+
labels: kind/bug
5+
---
6+
7+
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
8+
9+
Please try to use English to describe your issue, or at least provide a snippet of English translation.
10+
-->
11+
12+
Bug Report
13+
---
14+
15+
Type: *bug report*
16+
17+
### What happened
18+
19+
### What you expected to happen
20+
21+
### How to reproduce it (as minimally and precisely as possible)
22+
23+
### Anything else we need to know?
24+
25+
### Environment
26+
- image-syncer version:
27+
- OS (e.g. `cat /etc/os-release`):
28+
- Registry version (e.g. `habor`):
29+
- Others:

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
labels: kind/feature
5+
---
6+
7+
<!-- Here is for bug reports and feature requests ONLY!
8+
9+
Please try to use English to describe your issue, or at least provide a snippet of English translation.
10+
-->
11+
12+
Issue Description
13+
---
14+
15+
Type: *feature request*
16+
17+
### Describe what feature you want
18+
19+
### Additional context
20+
<!-- Add any other context or screenshots about the feature request here. -->

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Thanks for submitting a pull request! Here are some tips for you:
2+
1. Please make sure you have read and understood the contributing guidelines: https://github.com/AliyunContainerService/image-syncer/blob/main/CONTRIBUTING.md
3+
2. Please make sure the PR has a corresponding issue.
4+
-->
5+
6+
Pull Request Description
7+
---
8+
9+
### Describe what this PR does / why we need it
10+
11+
### Does this pull request fix one issue?
12+
<!--If that, add "Fixes #xxxx" below in the next line. For example, Fixes #15. Otherwise, add "NONE" -->
13+
14+
### Describe how you did it
15+
16+
### Describe how to verify it
17+
18+
### Special notes for reviews

‎.github/workflows/build.yml‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'mater'
7+
pull_request:
8+
branches:
9+
- 'master'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
17+
codecov:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Go
22+
uses: actions/setup-go@v2.1.3
23+
with:
24+
go-version: 1.15.7
25+
- uses: actions/cache@v2
26+
with:
27+
path: ~/go/pkg/mod
28+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29+
restore-keys: |
30+
${{ runner.os }}-go-
31+
- name: Test and update codecov
32+
run: |
33+
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
34+
- uses: codecov/codecov-action@v1.5.0
35+
with:
36+
file: ./coverage.txt
37+
flags: unittests
38+
fail_ci_if_error: true
39+
40+
build:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- name: Set up Go
45+
uses: actions/setup-go@v2
46+
with:
47+
go-version: 1.15.7
48+
49+
- name: Build
50+
run: make

‎.github/workflows/check.yml‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: check
2+
3+
on:
4+
push: { }
5+
pull_request: { }
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
13+
go-mod:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Go
18+
uses: actions/setup-go@v2.1.3
19+
with:
20+
go-version: 1.15.7
21+
- uses: actions/cache@v2
22+
with:
23+
path: ~/go/pkg/mod
24+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
25+
restore-keys: |
26+
${{ runner.os }}-go-
27+
- name: Check module vendoring
28+
run: |
29+
go mod tidy
30+
go mod vendor
31+
git diff --exit-code || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1)
32+
33+
golangci-lint:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
- name: Set up Go
38+
uses: actions/setup-go@v2.1.3
39+
with:
40+
go-version: 1.15.7
41+
- name: Run golangci-lint
42+
uses: golangci/golangci-lint-action@v2.5.2
43+
with:
44+
version: v1.39.0
45+
args: --timeout 300s --skip-dirs-use-default -v -E goconst -E gofmt -E ineffassign -E goimports -E revive -E misspell -E vet -E deadcode
46+
47+
go-test:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v2
51+
- name: Set up Go
52+
uses: actions/setup-go@v2.1.3
53+
with:
54+
go-version: 1.15.7
55+
- uses: actions/cache@v2
56+
with:
57+
path: ~/go/pkg/mod
58+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
59+
restore-keys: |
60+
${{ runner.os }}-go-
61+
- name: Test
62+
run: |
63+
go test -v ./...
64+
go test -race -v ./...
65+
66+
shellcheck:
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v2
70+
- name: Run ShellCheck
71+
uses: ludeeus/action-shellcheck@1.1.0
72+
env:
73+
SHELLCHECK_OPTS: -e SC2236,SC2162,SC2268
74+
with:
75+
ignore: tests
76+
77+
super-linter:
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v2
81+
- name: Lint Code Base
82+
uses: github/super-linter@v4.5.1
83+
env:
84+
VALIDATE_ALL_CODEBASE: true
85+
VALIDATE_MARKDOWN: true
86+
LINTER_RULES_PATH: .github
87+
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
88+
VALIDATE_MD: true
89+
DEFAULT_BRANCH: main
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
FILTER_REGEX_EXCLUDE: .github/.*

‎.github/workflows/release.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
env:
9+
BINARY_NAME: image-syncer
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
releases-matrix:
17+
name: Release Matrix
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
goos: [linux, darwin]
22+
goarch: [amd64, arm64]
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- uses: wangyoucao577/go-release-action@v1.16
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
goos: ${{ matrix.goos }}
30+
goarch: ${{ matrix.goarch }}
31+
binary_name: "${{ env.BINARY_NAME }}"
32+
build_flags: -v

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ records
44
.vscode
55
*.log
66
*.conf
7+
*.json

0 commit comments

Comments
 (0)