-
Notifications
You must be signed in to change notification settings - Fork 57
48 lines (40 loc) · 1.44 KB
/
release.yaml
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
on:
push:
tags:
- 'v*'
name: Release
jobs:
release:
runs-on: ubuntu-20.04
env:
DOCKER_REPO: ghcr.io/devplayer0/docker-net-dhcp
PLATFORMS: linux/amd64,linux/386,linux/arm64,linux/arm/v7
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install script dependencies
run: pip3 install -r scripts/requirements.txt
- id: vars
name: Generate release vars
run: |
echo "::set-output name=version::"$(echo "${{ github.ref }}" | sed -r 's|refs/tags/v(.+)|\1|')""
echo "Changelog: " > release.md
git log --pretty=format:" - %s" "$(git describe --tags --abbrev=0 ${{ github.event.ref }}^)"..${{ github.event.ref }} >> release.md
- name: Tag with release
env:
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
scripts/tag_multiarch_plugin.py -p $PLATFORMS "$DOCKER_REPO:latest" ${{ steps.vars.outputs.version }}
scripts/tag_multiarch_plugin.py -p $PLATFORMS "$DOCKER_REPO:latest" release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
tag_name: ${{ github.ref }}
release_name: docker-net-dhcp ${{ steps.vars.outputs.version }}
body_path: release.md