Skip to content

Commit 2661768

Browse files
committed
feat(ci): add github workflows
1 parent b6a27a7 commit 2661768

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
jobs:
9+
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Extract git tag
18+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
19+
20+
- name: Login to Docker Hub
21+
uses: docker/login-action@v1
22+
with:
23+
username: alexandreio
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+
- name: Build and push
27+
id: docker_build
28+
uses: docker/build-push-action@v2
29+
with:
30+
push: true
31+
tags: alexandreio/wordpress_exporter:latest,alexandreio/wordpress_exporter:${{ env.RELEASE_VERSION }}

0 commit comments

Comments
 (0)