-
Notifications
You must be signed in to change notification settings - Fork 14
40 lines (38 loc) · 1.2 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
on:
push:
branches: [master]
jobs:
dockerpush:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
- name: Set env
id: release
run: echo ::set-output name=RELEASE_VERSION::$(git describe --match "[0-9]*.[0-9]*.[0-9]*" --tags $(git rev-list --tags --max-count=1))
-
id: vars
run: |
echo ::set-output name=alpine_version::$(grep '^FROM alpine' Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2)
-
name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v4
with:
registry: ghcr.io
name: "ghcr.io/ironpeakservices/iron-alpine/iron-alpine:${{ steps.vars.outputs.alpine_version }}"
username: hazcod
password: ${{ secrets.PACKAGE_TOKEN }}
tag_semver: true
-
name: Create GitHub release
uses: actions/create-release@v1.1.4
if: steps.vars.outputs.alpine_version != steps.release.outputs.RELEASE_VERSION
with:
tag_name: ${{ steps.vars.outputs.alpine_version }}
release_name: iron-alpine
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}