-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: ci update: name of ci workflow update: ci workflow fix: action version fix: platform fix: QEMU for arm64 update: Dockerfile fix: Dockerfile
- Loading branch information
1 parent
fa3c4f7
commit 159015d
Showing
4 changed files
with
168 additions
and
53 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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Image for amd64 | ||
|
||
on: | ||
push: | ||
branches: [ "develop", "ci-test*" ] | ||
tags: [ "v*" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get Time | ||
id: time | ||
uses: nanzm/[email protected] | ||
with: | ||
timeZone: 8 | ||
|
||
- name: Docker Setup Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: gztime | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker Metadata action | ||
uses: docker/[email protected] | ||
id: meta | ||
with: | ||
# List of Docker images to use as base name for tags | ||
images: | | ||
ghcr.io/${{ github.repository_owner }}/gzctf/gzctf | ||
gztime/gzctf | ||
# List of tags as key-value pair attributes | ||
tags: | | ||
latest | ||
type=ref,event=branch | ||
type=semver,pattern={{raw}} | ||
type=sha,enable=true,priority=100,prefix=,suffix=,format=short | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
cache-from: type=gha | ||
cache-to: type=gha | ||
build-args: | | ||
TIMESTAMP=${{ steps.time.outputs.time }} | ||
GIT_SHA=${{ github.sha }} | ||
GIT_NAME=${{ github.ref_name }} | ||
push: true | ||
|
||
- name: Prune old packages | ||
uses: vlaurin/[email protected] | ||
with: | ||
token: ${{ secrets.PACKAGE_TOKEN }} | ||
container: "gzctf/gzctf" | ||
dry-run: false | ||
tag-regex: ^[0-9a-f]{6,40} | ||
keep-tags: | | ||
latest | ||
main | ||
develop | ||
keep-tags-regexes: | ||
^v(.)* | ||
keep-last: 5 | ||
untagged: true |
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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Image for arm64 | ||
|
||
on: | ||
push: | ||
branches: [ "develop", "ci-test*" ] | ||
tags: [ "v*" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get Time | ||
id: time | ||
uses: nanzm/[email protected] | ||
with: | ||
timeZone: 8 | ||
|
||
- name: Docker Setup QEMU | ||
uses: docker/[email protected] | ||
|
||
- name: Docker Setup Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: gztime | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker Metadata action | ||
uses: docker/[email protected] | ||
id: meta | ||
with: | ||
# List of Docker images to use as base name for tags | ||
images: | | ||
ghcr.io/${{ github.repository_owner }}/gzctf/gzctf | ||
gztime/gzctf | ||
# List of tags as key-value pair attributes | ||
tags: | | ||
latest | ||
type=ref,event=branch | ||
type=semver,pattern={{raw}} | ||
type=sha,enable=true,priority=100,prefix=,suffix=,format=short | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/arm64 | ||
cache-from: type=gha | ||
cache-to: type=gha | ||
build-args: | | ||
TIMESTAMP=${{ steps.time.outputs.time }} | ||
GIT_SHA=${{ github.sha }} | ||
GIT_NAME=${{ github.ref_name }} | ||
push: true | ||
|
||
- name: Prune old packages | ||
uses: vlaurin/[email protected] | ||
with: | ||
token: ${{ secrets.PACKAGE_TOKEN }} | ||
container: "gzctf/gzctf" | ||
dry-run: false | ||
tag-regex: ^[0-9a-f]{6,40} | ||
keep-tags: | | ||
latest | ||
main | ||
develop | ||
keep-tags-regexes: | ||
^v(.)* | ||
keep-last: 5 | ||
untagged: true |
This file was deleted.
Oops, something went wrong.
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