-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (47 loc) · 1.8 KB
/
dockerpush.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build and Publish Docker
on:
push:
tags:
- 'v*.*.*' ## will be the tag of docker image
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Publish Webclient to Docker Registry
uses: docker/build-push-action@v1
with:
repository: aaunetworksecurity/haaukins-webclient
username: aaunetworksecurity
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
dockerfile: ./client/Dockerfile
path: ./client
tag_with_ref: true
- name: Publish Webclient to Github Registry
uses: docker/build-push-action@v1
with:
repository: aau-network-security/haaukins-webclient/webclient
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: docker.pkg.github.com
dockerfile: ./client/Dockerfile
path: ./client
tag_with_ref: true
- name: prev_tag
run: echo "::set-output name=prevtag::$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)"
- name: current_tag
run: echo "::set-output name=currenttag::$(git describe --tags --abbrev=0)"
- name: Create Change Log
run: |
git --no-pager log --pretty=oneline ${{ steps.prev_tag.outputs.prevtag }}...${{ steps.current_tag.outputs.currenttag }} > changelog.txt
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: ./changelog.txt
draft: false
prerelease: false