-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ubuntu
committed
Jun 19, 2024
1 parent
3b27e0e
commit d4c6826
Showing
2 changed files
with
90 additions
and
20 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 |
---|---|---|
@@ -1,48 +1,83 @@ | ||
name: Update Rank | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Release Tags' | ||
target-platform: | ||
description: 'Target Platform' | ||
required: true | ||
default: 'amd64' | ||
|
||
jobs: | ||
update_rank: | ||
build_and_push_amd64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Build and push Docker image for amd64 | ||
if: ${{ github.event.inputs['target-platform'] == 'amd64' }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: beclab/r4rank:${{ github.event.inputs.tags }} | ||
tags: beclab/r4rank:${{ github.ref_name }}-amd64 | ||
file: Dockerfile.r4rank.amd64 | ||
platforms: linux/amd64 | ||
|
||
build_and_push_arm64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Build and push Docker image for arm64 | ||
if: ${{ github.event.inputs['target-platform'] == 'arm64' }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: beclab/r4rank:${{ github.event.inputs.tags }} | ||
tags: beclab/r4rank:${{ github.ref_name }}-arm64 | ||
file: Dockerfile.r4rank.arm64 | ||
platforms: linux/arm64 | ||
|
||
create_and_push_manifest: | ||
runs-on: ubuntu-latest | ||
needs: [build_and_push_amd64, build_and_push_arm64] | ||
steps: | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Create and push manifest | ||
run: | | ||
docker manifest create beclab/r4rank:${{ github.ref_name }} \ | ||
beclab/r4rank:${{ github.ref_name }}-amd64 \ | ||
beclab/r4rank:${{ github.ref_name }}-arm64 | ||
docker manifest push beclab/r4rank:${{ github.ref_name }} |
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 |
---|---|---|
@@ -1,48 +1,83 @@ | ||
name: Update Train | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Release Tags' | ||
target-platform: | ||
description: 'Target Platform' | ||
required: true | ||
default: 'amd64' | ||
|
||
jobs: | ||
update_train: | ||
build_and_push_amd64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Build and push Docker image for amd64 | ||
if: ${{ github.event.inputs['target-platform'] == 'amd64' }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: beclab/r4train:${{ github.event.inputs.tags }} | ||
tags: beclab/r4train:${{ github.ref_name }}-amd64 | ||
file: Dockerfile.r4train.amd64 | ||
platforms: linux/amd64 | ||
|
||
build_and_push_arm64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Build and push Docker image for arm64 | ||
if: ${{ github.event.inputs['target-platform'] == 'arm64' }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: beclab/r4train:${{ github.event.inputs.tags }} | ||
tags: beclab/r4train:${{ github.ref_name }}-arm64 | ||
file: Dockerfile.r4train.arm64 | ||
platforms: linux/arm64 | ||
|
||
create_and_push_manifest: | ||
runs-on: ubuntu-latest | ||
needs: [build_and_push_amd64, build_and_push_arm64] | ||
steps: | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Create and push manifest | ||
run: | | ||
docker manifest create beclab/r4train:${{ github.ref_name }} \ | ||
beclab/r4train:${{ github.ref_name }}-amd64 \ | ||
beclab/r4train:${{ github.ref_name }}-arm64 | ||
docker manifest push beclab/r4train:${{ github.ref_name }} |