Skip to content

Commit d7a7f18

Browse files
committed
ci: adjust ci for Recordermoe
- Add a new required input `DOCKERHUB_ORGANIZATION_NAME` in reusable Docker workflow. - Remove the `QUAY_USERNAME` and `QUAY_TOKEN` as required inputs. - Update the Docker images to exclude images from `quay.io` and include images from the new `DOCKERHUB_ORGANIZATION_NAME`. - Remove the step for logging in to Quay Container Registry. - Removed cache settings related to `ghcr.io` in the 'Build and push' step. - Add `DOCKERHUB_ORGANIZATION_NAME` parameter in docker build step in `docker_publish.yml`, removing `QUAY_USERNAME` and `QUAY_TOKEN` parameters. Signed-off-by: 陳鈞 <jim60105@gmail.com> Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
1 parent 11b9867 commit d7a7f18

2 files changed

Lines changed: 5 additions & 24 deletions

File tree

.github/workflows/docker-reused-steps/action.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ name: Reusable docker workflow
33
description: Reusable docker workflow.
44

55
inputs:
6+
DOCKERHUB_ORGANIZATION_NAME:
7+
required: true
68
DOCKERHUB_USERNAME:
79
required: true
810
DOCKERHUB_TOKEN:
911
required: true
10-
QUAY_USERNAME:
11-
required: true
12-
QUAY_TOKEN:
13-
required: true
1412
tag:
1513
required: true
1614

@@ -21,7 +19,7 @@ runs:
2119
id: meta
2220
uses: docker/metadata-action@v5
2321
with:
24-
images: ${{ inputs.DOCKERHUB_USERNAME }}/twitcasting-recorder,ghcr.io/${{ github.repository_owner }}/twitcasting-recorder,quay.io/${{ github.repository_owner }}/twitcasting-recorder
22+
images: ${{ inputs.DOCKERHUB_ORGANIZATION_NAME }}/twitcasting-recorder,ghcr.io/${{ github.repository_owner }}/twitcasting-recorder
2523
tags: |
2624
${{ inputs.tag }}
2725
latest
@@ -50,13 +48,6 @@ runs:
5048
username: ${{ github.repository_owner }}
5149
password: ${{ github.token }}
5250

53-
- name: Login to Quay Container Registry
54-
uses: docker/login-action@v3
55-
with:
56-
registry: quay.io
57-
username: ${{ inputs.QUAY_USERNAME }}
58-
password: ${{ inputs.QUAY_TOKEN }}
59-
6051
- name: Build and push
6152
id: build_push
6253
uses: docker/build-push-action@v6
@@ -71,26 +62,17 @@ runs:
7162
VERSION=${{ inputs.tag }}
7263
RELEASE=${{ github.run_number }}
7364
platforms: linux/amd64,linux/arm64
74-
# Cache to regietry instead of gha to avoid the capacity limit.
75-
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/twitcasting-recorder:cache
76-
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/twitcasting-recorder:cache,mode=max
7765
sbom: true
7866
provenance: true
7967

8068
- name: Attest Docker Hub image
8169
uses: actions/attest-build-provenance@v2
8270
with:
83-
subject-name: ${{ inputs.DOCKERHUB_USERNAME }}/twitcasting-recorder
71+
subject-name: ${{ inputs.DOCKERHUB_ORGANIZATION_NAME }}/twitcasting-recorder
8472
subject-digest: ${{ steps.build_push.outputs.digest }}
8573

8674
- name: Attest GHCR image
8775
uses: actions/attest-build-provenance@v2
8876
with:
8977
subject-name: ghcr.io/${{ github.repository_owner }}/twitcasting-recorder
9078
subject-digest: ${{ steps.build_push.outputs.digest }}
91-
92-
- name: Attest Quay image
93-
uses: actions/attest-build-provenance@v2
94-
with:
95-
subject-name: quay.io/${{ github.repository_owner }}/twitcasting-recorder
96-
subject-digest: ${{ steps.build_push.outputs.digest }}

.github/workflows/docker_publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ jobs:
3636
- name: Build docker
3737
uses: ./.github/workflows/docker-reused-steps
3838
with:
39+
DOCKERHUB_ORGANIZATION_NAME : ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }}
3940
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
4041
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
41-
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
42-
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
4342
tag: ${{ github.ref_name }}

0 commit comments

Comments
 (0)