Skip to content

Commit

Permalink
catalog creation (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxtof committed Feb 20, 2024
1 parent 6c900b4 commit fed5c71
Showing 1 changed file with 66 additions and 15 deletions.
81 changes: 66 additions & 15 deletions .github/workflows/build-extension-catalog.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,79 @@
name: Build and Release Extension Catalog

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash
working-directory: ./

jobs:
build-extension-catalog:
uses: rancher/dashboard/.github/workflows/build-extension-catalog.yml@master
permissions:
actions: write
contents: read
packages: write
with:
registry_target: ghcr.io
registry_user: ${{ github.actor }}
secrets:
registry_token: ${{ secrets.GITHUB_TOKEN }}
name: Build container image
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
runs-on: ubuntu-latest


steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Configure Git
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.8.0

- name: Setup yq
uses: redhat-actions/openshift-tools-installer@v1
with:
source: github
yq: v4.34.2

- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Setup yarn
run: npm install -g yarn

- name: Setup Nodejs with yarn caching
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn

- name: Install dependencies
run: yarn

- name: Parse Extension Name
if: github.ref_type == 'tag'
id: parsed-name
env:
GH_TOKEN: ${{ github.token }}
run: |
yarn parse-tag-name ${{ inputs.tagged_release }} ${{ github.run_id }} "catalog"
- name: Build and push UI image
run: |
publish="yarn publish-pkgs -cp -r ghcr.io -o ${{ github.repository_owner }}"
if [[ -n "${{ inputs.tagged_release }}" ]]; then
publish="$publish -t ${{ inputs.tagged_release }}"
fi
$publish

0 comments on commit fed5c71

Please sign in to comment.