We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 504f531 commit 747d888Copy full SHA for 747d888
.github/workflows/docker.yml
@@ -0,0 +1,24 @@
1
+name: Build and Publish Docker Image to DockerHub
2
+
3
+on:
4
+ push:
5
+ branches: ["main"]
6
7
+jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
11
+ steps:
12
+ - uses: actions/checkout@v3
13
14
+ - name: DockerHub Login
15
+ uses: docker/[email protected]
16
+ with:
17
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
18
+ password: ${{ secrets.DOCKERHUB_PASSWORD }}
19
20
+ - name: Build the Docker image
21
+ run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/learn-javascript
22
23
+ - name: Docker Push
24
+ run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/learn-javascript
Dockerfile
@@ -0,0 +1,2 @@
+FROM alpine:3.17.2
+CMD ["echo", "Hello World!"]
0 commit comments