Skip to content

Commit

Permalink
Merge main into feature branch with all updates
Browse files Browse the repository at this point in the history
  • Loading branch information
skoeva committed Jun 26, 2024
1 parent 4bdb6c4 commit 89bec55
Show file tree
Hide file tree
Showing 758 changed files with 217,723 additions and 218,414 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/app-artifacts-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
runs-on: macos-latest
permissions:
contents: read
secrets: read
actions: write # needed to upload artifacts
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -71,7 +70,6 @@ jobs:
permissions:
id-token: write # For fetching an OpenID Connect (OIDC) token
contents: read
secrets: read
runs-on: windows-latest
needs: build-mac
if: ${{ inputs.signBinaries }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docker-extension-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
build_and_push_docker_extension:
name: Build docker extension
runs-on: ubuntu-latest
permissions:
secrets: read # needed to fetch docker hub creds
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
Expand Down
180 changes: 143 additions & 37 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,171 @@ name: Build Frontend
on:
pull_request:
paths:
- 'frontend/**'
- 'Makefile'
- '.github/**'
- 'app/**'
- 'plugins/**'
- "frontend/**"
- "Makefile"
- ".github/**"
- "app/**"
- "plugins/**"
push:
branches:
- main
paths:
- 'frontend/**'
- Makefile
- '.github/**'
- 'app/**'
- 'plugins/**'
- "frontend/**"
- Makefile
- ".github/**"
- "app/**"
- "plugins/**"

permissions:
contents: read

jobs:
lint:
name: lint
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: |
make frontend-install
- name: Run linter
run: |
make frontend-lint
test:
name: test
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: |
make frontend-install
- name: Run tests
run: |
make frontend-test
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: |
make frontend-install
runs-on: ubuntu-22.04
- name: Build Frontend
run: |
make frontend-build
testplugins:
name: test plugins
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: |
make frontend-install-ci
- name: Test plugins
run: |
make plugins-test
- name: Run linter
run: |
make frontend-lint
builddocs:
name: build docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Run tests
run: |
make frontend-test
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Build Frontend
run: |
make frontend-build
- name: Build docs
run: |
make docs
buildstorybook:
name: build storybook
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Test plugins
run: |
make plugins-test
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Build docs
run: |
make docs
- name: Install dependencies
run: |
make frontend-install
- name: Build storybook
run: |
make frontend-build-storybook
- name: Build storybook
run: |
make frontend-build-storybook
34 changes: 34 additions & 0 deletions .github/workflows/helm-chart-template-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Template test Helm charts

on:
pull_request:
paths:
- charts/**
- '!charts/**/README.md'

permissions:
contents: read

jobs:
lint-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.0

- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Run template testing script
run: |
export SHELL=/bin/bash
make helm-template-test
1 change: 0 additions & 1 deletion .github/workflows/pr-to-update-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
permissions:
contents: write # needed to push a branch
pull-requests: write # needed to open a pull request
secrets: read

steps:
- name: Checkout headlamp repo
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/pr-to-update-winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: PR for updating winget

# This action will run after a tag starting with "v" is published
on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
winget-update:
runs-on: ubuntu-latest
steps:
- name: Checkout Headlamp
uses: actions/checkout@v4
with:
token: ${{ secrets.KINVOLK_REPOS_TOKEN }}
# we need the full history for the git tag command, so fetch all the branches
fetch-depth: 0

- name: Configure Git
run: |
user=${{github.actor}}
if [ -z $user ]; then
user=vyncent-t
fi
git config --global user.name "$user"
git config --global user.email "$user@users.noreply.github.com"
# Set up Node.js environment, pay attention to the version
# Some features might not be available in older versions
- name: Create node.js environment
uses: actions/setup-node@v4
with:
node-version: "21"

# Install the dependencies for the winget script
- name: Install winget dependencies
run: |
cd $GITHUB_WORKSPACE/app
npm install
# We set the latest tag as an environment variable before we use it in the next steps
# note that we have to echo the variable to the environment file to make it available in the next steps
- name: Set latest tag
run: |
echo "Setting latest tag"
latestTag=$(git tag --list --sort=version:refname 'v*' | tail -1)
# Remove the 'v' from the tag
latestTag=${latestTag#v}
echo "LATEST_HEADLAMP_TAG=$latestTag" >> $GITHUB_ENV
echo $latestTag
# checkout the winget-pkgs repository
- name: Checkout winget-pkgs
uses: actions/checkout@v4
with:
repository: headlamp-k8s/winget-pkgs
path: winget-pkgs
token: ${{ secrets.KINVOLK_REPOS_TOKEN }}
# we need the full history for the git tag command, so fetch all the branches
fetch-depth: 0

# Run the winget script
- name: Create winget package
run: |
echo "Running winget script"
echo "Repository: ${{ github.repository }}"
echo "Workspace: ${GITHUB_WORKSPACE}"
echo $GITHUB_WORKSPACE
pwd
echo "creating winget pkgs for ${LATEST_HEADLAMP_TAG}"
cd $GITHUB_WORKSPACE/app/windows/winget
node winget-create.js $LATEST_HEADLAMP_TAG $GITHUB_WORKSPACE/winget-pkgs/manifests/h/Headlamp/Headlamp
echo "Script finished"
- name: Create PR branch
run: |
user=${{github.actor}}
if [ -z $user ]; then
user=vyncent-t
fi
echo "Creating PR branch"
echo "Repository: ${{ github.repository }}"
echo "Workspace: ${GITHUB_WORKSPACE}"
pwd
echo "moving to winget-pkgs directory"
cd $GITHUB_WORKSPACE/winget-pkgs
pwd
ls
echo "moving to Headlamp directory"
cd $GITHUB_WORKSPACE/winget-pkgs/manifests/h/Headlamp/Headlamp
pwd
ls
git checkout -b "winget-update-$LATEST_HEADLAMP_TAG"
git add .
git commit -s -m "Update winget package $LATEST_HEADLAMP_TAG"
git push origin "winget-update-$LATEST_HEADLAMP_TAG"
env:
GITHUB_TOKEN: ${{ secrets.KINVOLK_REPOS_TOKEN }}

- name: Create Pull Request
run: |
echo "Create pull request"
echo "continue with the following link"
echo "https://github.com/headlamp-k8s/winget-pkgs/pull/new/winget-update-$LATEST_HEADLAMP_TAG"
Loading

0 comments on commit 89bec55

Please sign in to comment.