Merge pull request #158 from openshift-cherrypick-robot/cherry-pick-1… #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '18' | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login in to ghcr.io registry | |
uses: docker/#-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
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 }}' |