Skip to content

Commit 0945645

Browse files
[REF] CI.yaml workflow
1 parent 1256915 commit 0945645

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CICD using Github actions
1+
# CICD using GitHub actions
22

33
name: CI/CD
44

@@ -42,4 +42,30 @@ jobs:
4242
- name: Run golangci-lint
4343
uses: golangci/golangci-lint-action@v6
4444
with:
45-
version: v1.56.2
45+
version: v1.56.2
46+
47+
push:
48+
runs-on: ubuntu-latest
49+
50+
needs: build
51+
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
- name: Set up Docker Buildx
57+
uses: docker/setup-buildx-action@v1
58+
59+
- name: Login to DockerHub
60+
uses: docker/login-action@v3
61+
with:
62+
username: ${{ secrets.DOCKERHUB_USERNAME }}
63+
password: ${{ secrets.DOCKERHUB_TOKEN }}
64+
65+
- name: Build and Push action
66+
uses: docker/build-push-action@v6
67+
with:
68+
context: .
69+
file: ./Dockerfile
70+
push: true
71+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/go-web-app:${{github.run_id}}

0 commit comments

Comments
 (0)