-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.24 KB
/
release.yaml
File metadata and controls
44 lines (42 loc) · 1.24 KB
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
name: release
on:
push:
tags:
- '*'
jobs:
build-push:
env:
IMG_REPO: gitopsrun/webpp-frontend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Kustomize
uses: ./.github/actions/kustomize
- name: Set image metadata
id: image
run: |
TAG=${GITHUB_REF/refs\/tags\//}
IMG=${IMG_REPO}:${TAG}
echo ::set-output name=IMG::${IMG}
echo ::set-output name=TAG::${TAG}
- name: Push image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ env.IMG_REPO }}
tags: ${{ steps.image.outputs.TAG }}
build_args: VERSION=${{ steps.image.outputs.TAG }},GITCOMMIT=${{ github.sha }}
- name: Create release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
body: |
Container image: ${{ steps.image.outputs.IMG }}