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

Replace the habor registery with docker #134

Merged
merged 2 commits into from
Feb 4, 2024
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
56 changes: 7 additions & 49 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,73 +18,31 @@ defaults:

jobs:
docker:
runs-on:
- self-hosted
- ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- centos-7
- centos-8
#- ubuntu-1604
#- ubuntu-1804
- ubuntu-2004
- ubuntu-2204
arch:
- amd64
- arm64
steps:
- uses: webiny/[email protected]
with:
run: sh -c "find . -mindepth 1 -delete"
- name: Setup environment variables
id: vars
run: |
echo "TAG=$(echo ${{ matrix.os }} | tr -d '-')" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ${{ secrets.HARBOR_REGISTRY }}
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: .
file: ./docker/buildx/${{ matrix.os }}.Dockerfile
platforms: linux/${{ matrix.arch }}
tags: |
${{ secrets.HARBOR_REGISTRY }}/vesoft/third-party-build:${{ steps.vars.outputs.TAG }}-${{ matrix.arch }}
cache-to: type=local,dest=/tmp/buildx-cache,mode=max
platforms: linux/amd64,linux/arm64
tags: vesoft/third-party-build:${{ steps.vars.outputs.TAG }}
push: true

manifest:
needs: docker
runs-on:
- self-hosted
strategy:
fail-fast: false
matrix:
os:
- centos7
- centos8
#- ubuntu1604
#- ubuntu1804
- ubuntu2004
- ubuntu2204
steps:
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ${{ secrets.HARBOR_REGISTRY }}
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Create and push manifest
env:
DOCKER_CLI_EXPERIMENTAL: enabled
IMAGE: ${{ secrets.HARBOR_REGISTRY }}/vesoft/third-party-build:${{ matrix.os }}
run: |
docker manifest create $IMAGE --amend $IMAGE-amd64 --amend $IMAGE-arm64
docker manifest push $IMAGE