Skip to content

Commit 007879c

Browse files
authored
Create build-and-push-to-dockerhub.yml (#716)
1 parent ab51d18 commit 007879c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build and Push to Docker Hub
2+
3+
on:
4+
workflow_dispatch:
5+
# on:
6+
# push:
7+
# branches:
8+
# - main # Replace with your branch name
9+
10+
jobs:
11+
build-and-push:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Login to Docker Hub
19+
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
20+
21+
- name: Build and push Docker image
22+
run: |
23+
docker build -t arc/service:latest .
24+
docker push arc/service:latest

0 commit comments

Comments
 (0)