-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.25 KB
/
release-docker-iamge.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
name: Release workoutrecorder-frontend image
on:
workflow_dispatch:
inputs:
version:
description: 'App version to release'
required: true
default: '1.0.0'
fabioip:
description: 'Public fabio ip addres'
required: true
jobs:
release:
name: Release workoutrecorder-frontend
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set app version
run: |
version=${{ github.event.inputs.version }}
sed -i "s/<VERSION>/$version/g" frontend/package.json
- name: Set fabio public ip
run: |
fabioip=${{ github.event.inputs.fabioip }}
sed -i "s/<FABIO_PUBLIC_IP>/$fabioip/g" frontend/src/environments/environment.prod.ts
- name: Login to Github container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: ghcr.io/red-devops/workoutrecorder-frontend:${{ github.event.inputs.version }}