Skip to content

Commit 6eca6c8

Browse files
committed
chore(ci): simplify image publication process
1 parent aa7d07d commit 6eca6c8

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

.github/actions/apko/build/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ runs:
5050
with:
5151
version: ${{ inputs.dagger-version }}
5252
cloud-token: ${{ inputs.dagger-cloud-token }}
53-
module: github.com/opopops/daggerverse/[email protected].6
53+
module: github.com/opopops/daggerverse/[email protected].9
5454
verb: call
5555
args: |
5656
build \

.github/actions/apko/publish/action.yaml

+7-24
Original file line numberDiff line numberDiff line change
@@ -47,46 +47,29 @@ runs:
4747
id: publish
4848
uses: dagger/dagger-for-github@v7
4949
env:
50+
DOCKER_HUB_PASSWORD: ${{ inputs.dockerhub-password }}
5051
GH_TOKEN: ${{ github.token }}
5152
with:
5253
engine-stop: false
5354
version: ${{ inputs.dagger-version }}
5455
cloud-token: ${{ inputs.dagger-cloud-token }}
55-
module: github.com/opopops/daggerverse/[email protected].6
56+
module: github.com/opopops/daggerverse/[email protected].9
5657
verb: call
5758
args: |
5859
with-registry-auth \
5960
--address=ghcr.io \
6061
--username=${{ github.actor }} \
6162
--secret=env:GH_TOKEN \
63+
with-registry-auth \
64+
--address=docker.io \
65+
--username=${{ inputs.dockerhub-username }} \
66+
--secret=env:DOCKER_HUB_PASSWORD \
6267
publish \
6368
--context=${{ github.workspace }} \
6469
--config=${{ inputs.config }} \
6570
--tag=ghcr.io/${{ inputs.tag }} \
71+
--tag=docker.io/${{ inputs.tag }} \
6672
--arch=${{ inputs.arch }} \
6773
--keyring-append=${{ inputs.keyring-append }} \
6874
--repository-append=${{ inputs.repository-append }} \
6975
digest \
70-
71-
- name: Copy image to Docker Hub
72-
uses: dagger/dagger-for-github@v7
73-
env:
74-
DOCKER_HUB_PASSWORD: ${{ inputs.dockerhub-password }}
75-
GH_TOKEN: ${{ github.token }}
76-
with:
77-
version: ${{ inputs.dagger-version }}
78-
cloud-token: ${{ inputs.dagger-cloud-token }}
79-
module: github.com/opopops/daggerverse/[email protected]
80-
verb: call
81-
args: |
82-
with-registry-auth \
83-
--address=ghcr.io \
84-
--username=${{ github.actor }} \
85-
--secret=env:GH_TOKEN \
86-
with-registry-auth \
87-
--address=docker.io \
88-
--username=${{ inputs.dockerhub-username }} \
89-
--secret=env:DOCKER_HUB_PASSWORD \
90-
copy \
91-
--source=ghcr.io/${{ inputs.tag }} \
92-
--target=docker.io/${{ inputs.tag }} \

0 commit comments

Comments
 (0)