forked from openshift-pipelines/console-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.13 KB
/
publish_container_image.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
45
name: publish container images
on:
push:
branches:
- main
- release-v* # example: release-v1.14
tags: ['v*']
jobs:
setup:
name: build container
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- uses: docker/setup-buildx-action@v3
- name: Login in to ghcr.io registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
- name: Build and push Dynamic Console container image
run: ./scripts/build_container.sh
env:
SUPPORT_MULTI_ARCH: "true"
CONSOLE_PLUGIN_IMAGE_REPO: 'ghcr.io/${{ github.repository }}'
CONSOLE_PLUGIN_IMAGE_TAG: '${{ github.ref_name }}'