-
Notifications
You must be signed in to change notification settings - Fork 23
36 lines (34 loc) · 1.1 KB
/
publish_release.yml
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
31
32
33
34
35
36
name: Publish Release Version
on:
push:
tags:
- 'v*'
jobs:
build:
name: Publish Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Get build date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %z')"
- name: Get version
id: version
run: echo "::set-output name=version::$(echo ${{ github.ref }} | sed 's/refs\/tags\///' | sed 's/v//')"
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
env:
VCS_REF: ${{ github.sha }}
VERSION: ${{ github.ref }}
BUILD_DATE: ${{ steps.date.outputs.date }}
with:
name: icyleafcn/zealot:${{ steps.date.outputs.version }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
buildargs: BUILD_DATE,VCS_REF,VERSION
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: icyleafcn/hpr