Skip to content

Commit b4f8ef5

Browse files
committed
adds gh action for release
1 parent 24a3d19 commit b4f8ef5

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
name: release
6+
jobs:
7+
release:
8+
name: release
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: checkout
12+
uses: actions/checkout@v2
13+
- name: get version
14+
id: get_version
15+
run: |
16+
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
17+
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
18+
- name: create release
19+
uses: actions/create-release@v1
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
tag_name: ${{ github.ref }}
24+
release_name: ${{ steps.get_version.outputs.TAG }}
25+
prerelease: ${{ endsWith(steps.get_version.outputs.TAG, '-dev') }}
26+
body: |
27+
See [README](https://github.com/marshallford/default-allow-privilege-escalation/blob/${{ steps.get_version.outputs.TAG }}/README.md) for install instructions.
28+
29+
**container image:**
30+
```
31+
docker pull docker.io/marshallford/default-allow-privilege-escalation:${{ steps.get_version.outputs.VERSION }}
32+
```
33+
34+
**kustomize:**
35+
```
36+
kustomize build github.com/marshallford/default-allow-privilege-escalation/deploy?ref=${{ steps.get_version.outputs.TAG }}
37+
```

0 commit comments

Comments
 (0)