Skip to content

Commit

Permalink
✨ Push image to acr
Browse files Browse the repository at this point in the history
  • Loading branch information
tosone committed Jun 11, 2024
1 parent 95816e7 commit bf1667e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ jobs:
registry: ghcr.io
username: tosone
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Aliyun acr
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -84,6 +91,7 @@ jobs:
images: |
ghcr.io/${{ github.repository }}
docker.io/tosone/sigma
registry.cn-hangzhou.aliyuncs.com/go-sigma/sigma
tags: |
type=ref,event=pr
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }}
Expand Down Expand Up @@ -131,6 +139,13 @@ jobs:
registry: ghcr.io
username: tosone
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Aliyun acr
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -172,6 +187,7 @@ jobs:
images: |
ghcr.io/${{ github.repository }}
docker.io/tosone/sigma
registry.cn-hangzhou.aliyuncs.com/go-sigma/sigma
flavor: |
latest=false
tags: |
Expand Down Expand Up @@ -223,6 +239,13 @@ jobs:
registry: ghcr.io
username: tosone
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Aliyun acr
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -264,6 +287,7 @@ jobs:
images: |
ghcr.io/${{ github.repository }}
docker.io/tosone/sigma
registry.cn-hangzhou.aliyuncs.com/go-sigma/sigma
flavor: |
latest=false
tags: |
Expand Down Expand Up @@ -313,6 +337,13 @@ jobs:
registry: ghcr.io
username: tosone
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Aliyun acr
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -354,6 +385,7 @@ jobs:
images: |
ghcr.io/${{ github.repository }}
docker.io/tosone/sigma
registry.cn-hangzhou.aliyuncs.com/go-sigma/sigma
flavor: |
latest=false
tags: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ endif
docker run --rm -it -v $(shell pwd):/data cytopia/yamllint -f parsable $(shell git ls-files '*.yml' '*.yaml') $(OUTPUT_OPTIONS)

## Docker:
docker-build: #docker-build-builder-local dockerfile-local ## Use the dockerfile to build the sigma image
docker-build: docker-build-builder-local dockerfile-local ## Use the dockerfile to build the sigma image
docker buildx build --build-arg USE_MIRROR=$(USE_MIRROR) --build-arg WITH_TRIVY_DB=$(WITH_TRIVY_DB) -f build/Dockerfile --platform $(DOCKER_PLATFORMS) --progress plain --output type=docker,name=$(DOCKER_REGISTRY)/$(BINARY_NAME):latest,push=false,oci-mediatypes=true,compression=zstd,compression-level=12,force-compression=true .

docker-build-builder: ## Use the dockerfile to build the sigma-builder image
Expand Down

0 comments on commit bf1667e

Please sign in to comment.