-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (39 loc) · 1.27 KB
/
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
37
38
39
40
41
42
name: Release
on:
push:
tags:
- '**'
# remove comments if a recent tag push should
# terminate the older running action
#concurrency:
# group: ${{ github.ref }}
# cancel-in-progress: true
jobs:
build-and-publish-docker-images:
name: Build and publish Docker images
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Make the shell script executable
run: chmod +x ./_docker/docker-build-and-publish.sh
- name: Get the version
id: get_version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Build and publish
run: ./_docker/docker-build-and-publish.sh ${{ steps.get_version.outputs.version }}
- name: Generate changelog
id: changelog
uses: metcalfc/[email protected]
with:
myToken: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.changelog }}
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}