forked from GZTimeWalker/GZCTF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'another/develop' into develop
- Loading branch information
Showing
20 changed files
with
114 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
push: | ||
branches: ["develop", "ci/*", "v*"] | ||
tags: ["v*"] | ||
paths: ["src/GZCTF/**"] | ||
paths: ["src/GZCTF/**", ".github/workflows/**"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -14,6 +14,10 @@ jobs: | |
run: | ||
working-directory: src/GZCTF | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -51,12 +55,6 @@ jobs: | |
- name: Docker setup Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: gztime | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -78,14 +76,13 @@ jobs: | |
# latest tag is only created for `v*.*.*` or `v*.*.*-patch.*` tags | ||
RELEASE: ${{ startsWith(github.ref, 'refs/tags/v') && (contains(github.ref, 'patch') || !contains(github.ref, '-')) }} | ||
with: | ||
images: | | ||
gztime/gzctf | ||
ghcr.io/${{ github.repository }}/gzctf | ||
registry.cn-shanghai.aliyuncs.com/gztime/gzctf | ||
images: ghcr.io/${{ github.repository }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
flavor: | | ||
latest=${{ env.RELEASE }} | ||
tags: | | ||
type=ref,event=branch | ||
develop,enable=${{ startsWith(github.ref, 'refs/heads/develop') }} | ||
type=sha,enable=true,priority=100,prefix=,suffix=,format=short | ||
type=match,enable=${{ env.RELEASE }},pattern=v\d+,group=0 | ||
type=match,enable=${{ env.RELEASE }},pattern=v\d+.\d+,group=0 | ||
|
@@ -100,17 +97,17 @@ jobs: | |
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
|
||
- name: Prune old packages | ||
uses: vlaurin/[email protected] | ||
with: | ||
dry-run: false | ||
token: ${{ secrets.PACKAGE_TOKEN }} | ||
container: ${{ github.event.repository.name }}/gzctf | ||
keep-tags-regexes: ^v\d+\.\d+\.\d+$ | ||
prune-tags-regexes: ^[0-9a-f]{6,40} | ||
keep-tags: | | ||
latest | ||
main | ||
develop | ||
keep-last: 20 | ||
prune-untagged: false | ||
#- name: Prune old packages | ||
# uses: vlaurin/[email protected] | ||
# with: | ||
# dry-run: false | ||
# token: ${{ secrets.PACKAGE_TOKEN }} | ||
# container: ${{ github.event.repository.name }}/gzctf | ||
# keep-tags-regexes: ^v\d+\.\d+\.\d+$ | ||
# prune-tags-regexes: ^[0-9a-f]{6,40} | ||
# keep-tags: | | ||
# latest | ||
# main | ||
# develop | ||
# keep-last: 20 | ||
# prune-untagged: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ const Register: FC = () => { | |
const [retypedPwd, setRetypedPwd] = useInputState('') | ||
const [uname, setUname] = useInputState('') | ||
const [email, setEmail] = useInputState('') | ||
const [stdNumber, setStdNumber] = useInputState('') | ||
const [disabled, setDisabled] = useState(false) | ||
|
||
const navigate = useNavigate() | ||
|
@@ -91,6 +92,7 @@ const Register: FC = () => { | |
userName: uname, | ||
password: pwd, | ||
email: email, | ||
stdNumber: stdNumber, | ||
challenge: token, | ||
}) | ||
const data = RegisterStatusMap.get(res.data.data) | ||
|
@@ -127,23 +129,36 @@ const Register: FC = () => { | |
<AccountView onSubmit={onRegister}> | ||
<TextInput | ||
required | ||
label={t('account.label.email')} | ||
type="email" | ||
placeholder="[email protected]" | ||
label={t('account.label.username')} | ||
type="text" | ||
placeholder="ctfer" | ||
w="100%" | ||
value={email} | ||
value={uname} | ||
disabled={disabled} | ||
onChange={(event) => setEmail(event.currentTarget.value)} | ||
onChange={(event) => setUname(event.currentTarget.value)} | ||
/> | ||
<TextInput | ||
required | ||
label={t('account.label.username')} | ||
label={t('account.label.stdNumber')} | ||
type="text" | ||
placeholder="ctfer" | ||
placeholder="2024000000" | ||
w="100%" | ||
value={uname} | ||
value={stdNumber} | ||
disabled={disabled} | ||
onChange={(event) => setUname(event.currentTarget.value)} | ||
onChange={(event) => [ | ||
setStdNumber(event.currentTarget.value), | ||
setEmail(event.currentTarget.value + '@bupt.cn'), | ||
]} | ||
/> | ||
<TextInput | ||
required | ||
label={t('account.label.email')} | ||
type="email" | ||
placeholder="[email protected]" | ||
w="100%" | ||
value={email} | ||
disabled={disabled} | ||
onChange={(event) => setEmail(event.currentTarget.value)} | ||
/> | ||
<StrengthPasswordInput | ||
value={pwd} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters