We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1553043 commit 4d66d44Copy full SHA for 4d66d44
.github/workflows/cd.yml
@@ -0,0 +1,24 @@
1
+name: CD
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - "*"
7
8
+jobs:
9
+ deploy:
10
+ name: Deploy to Docker Hub
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v2
15
+ - name: Build and tag Docker image
16
+ run: |
17
+ export TAG=${GITHUB_REF##*/}
18
+ echo Building for tag "$TAG"
19
+ docker build -t $IMG_NAME:$TAG .
20
+ docker tag $IMG_NAME:$TAG $IMG_NAME:latest
21
+ echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_LOGIN }}" --password-stdin
22
+ docker push $IMG_NAME
23
+ env:
24
+ IMG_NAME: mloncode/workshop
0 commit comments