forked from mendhak/docker-http-https-echo
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (25 loc) · 754 Bytes
/
publish.yml
File metadata and controls
30 lines (25 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Publish to Docker Hub
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the image
run: docker build -t mendhak/test-image .
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: mendhak/http-https-echo:${{ steps.get_version.outputs.VERSION }}