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: update docker-build action #298

Merged
merged 2 commits into from
Nov 7, 2022
Merged
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
41 changes: 32 additions & 9 deletions .github/workflows/build-docker-push.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: build-docker-push
name: docker-build

on:
# schedule:
# - cron: '26 4 * * *'
# schedule:
# - cron: '0 0 1 * * ?'
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: public.ecr.aws/vanus
USERNAME: AWS
REGISTRY_AWS: public.ecr.aws/vanus
USERNAME_AWS: AWS
REGISTRY_TENCENT: linkall.tencentcloudcr.com

jobs:
build:
aws:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -35,6 +35,29 @@ jobs:
password: ${{ secrets.AWS_ECR_TOKEN }}

- name: Build and Push
timeout-minutes: 5
timeout-minutes: 30
run: |
make docker-push IMAGE_TAG=dev
make docker-push IMAGE_TAG=dev
tencent:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3

# https://github.com/docker/build-push-action:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_TENCENT }}
username: ${{ secrets.TENCENT_CR_USERNAME }}
password: ${{ secrets.TENCENT_CR_TOKEN }}
- name: Build and Push
timeout-minutes: 120
run: |
make docker-push DOCKER_REGISTRY=linkall.tencentcloudcr.com IMAGE_TAG=dev