mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more [here](https://redirect.github.com/renovatebot/renovate/discussions/37842). This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-node](https://redirect.github.com/actions/setup-node) | action | major | `v4` -> `v5` | --- ### Release Notes <details> <summary>actions/setup-node (actions/setup-node)</summary> ### [`v5`](https://redirect.github.com/actions/setup-node/compare/v4...v5) [Compare Source](https://redirect.github.com/actions/setup-node/compare/v4...v5) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/morten-olsen/homelab-operator). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
96 lines
2.3 KiB
YAML
96 lines
2.3 KiB
YAML
name: Build, tag and release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
|
|
env:
|
|
environment: test
|
|
release_channel: latest
|
|
DO_NOT_TRACK: "1"
|
|
NODE_VERSION: "23.x"
|
|
DOCKER_REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
PNPM_VERSION: 10.6.0
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: "${{ env.NODE_VERSION }}"
|
|
registry-url: "${{ env.NODE_REGISTRY }}"
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
name: Install pnpm
|
|
with:
|
|
version: ${{ env.PNPM_VERSION }}
|
|
run_install: false
|
|
|
|
- name: Get pnpm store directory
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
|
|
- uses: actions/cache@v4
|
|
name: Setup pnpm cache
|
|
with:
|
|
path: ${{ env.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: images/operator
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Run tests
|
|
working-directory: images/operator
|
|
run: pnpm test
|
|
|
|
update-release-draft:
|
|
name: Update release drafter
|
|
if: github.ref == 'refs/heads/main'
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
needs: build
|
|
environment: release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- id: create-release
|
|
uses: release-drafter/release-drafter@v6
|
|
with:
|
|
config-name: release-drafter-config.yml
|
|
publish: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
asset_path: ./operator.yaml
|
|
asset_name: operator.yaml
|
|
asset_content_type: application/yaml
|