Skip to content

Commit fd4970a

Browse files
committed
chore: push image to container registry
1 parent f2f0bcb commit fd4970a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/ci.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,20 @@ jobs:
4545
- name: Run tests
4646
run: pnpm run test
4747

48+
- name: Login on Container Registry
49+
uses: docker/login-action@v3
50+
with:
51+
username: ${{ secrets.DOCKERHUB_USERNAME }}
52+
password: ${{ secrets.DOCKERHUB_TOKEN }}
53+
4854
- name: Create tag
4955
id: create_tag
5056
run: |
5157
SHA=$(echo $GITHUB_SHA | head -c7)
5258
echo "sha=$SHA" >> $GITHUB_OUTPUT
5359
5460
- name: Build docker image
55-
run: docker build -t devops-sample-api-ci:${{ steps.create_tag.outputs.sha }} .
61+
run: docker build -t rcmonteiro/devops-sample-api-ci:${{ steps.create_tag.outputs.sha }} .
5662

63+
- name: Push image to container registry
64+
run: docker push rcmonteiro/devops-sample-api-ci:${{ steps.create_tag.outputs.sha }}

0 commit comments

Comments
 (0)