-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (55 loc) · 1.8 KB
/
main.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
56
57
58
59
60
61
name: Docker Releaser Workflow
on:
workflow_dispatch:
inputs:
release_version:
type: string
description: release version when building docker containers (example; 2.0.0)
jobs:
build_aws_connector_docker_image:
name: Release docker images
runs-on: ubuntu-latest
steps:
- name: Login to Github Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@master
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
build-args: |
SHA1VER=${{ env.SHA1VER }}
VERSION=${{ github.event.inputs.release_version }}
tags: |
ghcr.io/lamassuiot/lamassu-ui:${{ github.event.inputs.release_version }}
ghcr.io/lamassuiot/lamassu-ui:latest
push: true
- name: Create tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ github.event.inputs.release_version }}',
sha: context.sha
})
- name: Create Release
id: create_release
uses: actions/create-release@latest
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.event.inputs.release_version }}
release_name: Release v${{ github.event.inputs.release_version }}
body: |
Changes in this Release
- First Change
- Second Change
draft: false
prerelease: false