aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-10 17:20:37 +0800
committercrupest <crupest@outlook.com>2020-06-10 17:20:37 +0800
commit02bb1b3ae177c68d6fe59c6ad033a59e82e3903c (patch)
tree784683aef872ac82c39eedbddb66d45b2d508e5a /.github
parentc7996cffc082943c82668f0896b7accf852453fe (diff)
downloadtimeline-02bb1b3ae177c68d6fe59c6ad033a59e82e3903c.tar.gz
timeline-02bb1b3ae177c68d6fe59c6ad033a59e82e3903c.tar.bz2
timeline-02bb1b3ae177c68d6fe59c6ad033a59e82e3903c.zip
infra(ci): Add versioned docker image cd.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/cd-version.yaml24
-rw-r--r--.github/workflows/cd.yaml2
2 files changed, 25 insertions, 1 deletions
diff --git a/.github/workflows/cd-version.yaml b/.github/workflows/cd-version.yaml
new file mode 100644
index 00000000..963649ca
--- /dev/null
+++ b/.github/workflows/cd-version.yaml
@@ -0,0 +1,24 @@
+name: Build And Upload Versioned Docker Image
+
+on:
+ push:
+ tags:
+ - "v[0-9]+.[0-9]+.[0-9]+*"
+ paths-ignore:
+ - "**/README.md"
+
+jobs:
+ deploy:
+ name: Build And Push Docker
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Build And Push to Docker Hub
+ uses: docker/build-push-action@v1
+ with:
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
+ password: ${{ secrets.DOCKER_HUB_PASSWORD }}
+ repository: crupest/timeline
+ tag_with_ref: true
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index f7d62936..0e93a1b4 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -1,4 +1,4 @@
-name: Build And Upload Docker Image
+name: Build And Upload Latest Docker Image
on:
push: