Skip to content

Commit d335c13

Browse files
committed
add dockerhub support
1 parent e0517de commit d335c13

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build-cloudsmith-agent.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
oidc-namespace: ${{ vars.CLOUDSMITH_NAMESPACE }}
6767
oidc-service-slug: ${{ vars.CLOUDSMITH_SVC_SLUG }}
6868

69-
- name: Build and push image
69+
- name: Build and push image to Cloudsmith
7070
if: env.build_needed == 'true'
7171
run: |
7272
echo "Building image with tag: ${{ env.IMAGE_VERSION }}"
@@ -75,6 +75,13 @@ jobs:
7575
echo "${CLOUDSMITH_API_KEY}" | docker login docker.cloudsmith.io -u ${{ vars.CLOUDSMITH_SVC_SLUG }} --password-stdin
7676
docker push docker.cloudsmith.io/${{ vars.CLOUDSMITH_NAMESPACE }}/cloudsmith-datadog-agent/cloudsmith-datadog-agent:${{ env.IMAGE_VERSION }}
7777
78+
- name: Push image to DockerHub
79+
if: env.build_needed == 'true'
80+
run: |
81+
82+
echo "${{ secrets.DOCKERHUB_PAT }}" | docker login docker.cloudsmith.io -u ${{ vars.DOCKERHUB_USER }} --password-stdin
83+
docker push cloudsmith/cloudsmith-datadog-agent:${{ env.IMAGE_VERSION }}
84+
7885
echo "${{ env.LATEST_TAG }}" > .last-built-version
7986
git config user.name "github-actions[bot]"
8087
git config user.email "github-actions[bot]@users.noreply.github.com"

0 commit comments

Comments
 (0)