-
Notifications
You must be signed in to change notification settings - Fork 16
47 lines (37 loc) · 1.17 KB
/
update-docker-image.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
name: Update UI Docker image
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
build:
if: github.repository == 'eclipse-pass/pass-ui'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
ENV_FILE: https://raw.githubusercontent.com/eclipse-pass/pass-docker/main/.env
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v2
with:
node-version: 18
cache: 'yarn'
- name: Get current project version
id: project-version
run: echo "VERSION=`npx -c 'echo $npm_package_version'`" >> $GITHUB_OUTPUT
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build pass-ui
uses: ./.github/actions/build-pass-ui
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Push new Docker images'
run: |
docker push ghcr.io/eclipse-pass/pass-ui:latest
docker push ghcr.io/eclipse-pass/pass-ui:${{ steps.project-version.outputs.version }}