diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c18b4d..b0bf9a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,11 +4,9 @@ on: push: branches: - main - - dev pull_request: branches: - main - - dev jobs: prerequisites: diff --git a/.github/workflows/publish-helm-chart.yml b/.github/workflows/publish-helm-chart.yml new file mode 100644 index 0000000..e8b245c --- /dev/null +++ b/.github/workflows/publish-helm-chart.yml @@ -0,0 +1,61 @@ + + +name: Publish helm chart + +# Trigger the workflow on pushed tags or commits to main branch. +on: + workflow_dispatch: + push: + paths-ignore: + - docs/** + - '**.md' + - .github/workflows/* + - '!.github/workflows/publish-helm-chart.yaml' + branches: + - main + tags: + - '**' + +jobs: + # Packages the Helm chart, and pushes it to 2i2c-org/k8s-node-controller@gh-pages. + # + publish: + runs-on: ubuntu-24.04 + + # Explicitly request permissions to push to this git repository's gh-pages + # branch via the the GITHUB_TOKEN we can have access to. + permissions: + contents: write + + steps: + - uses: actions/checkout@v7 + with: + # chartpress needs git history + fetch-depth: 0 + + - uses: actions/setup-python@v7 + with: + python-version: 3.14 + + - name: Login to Quay.io + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Configure a git user + run: | + git config --global user.email "github-actions@github.com" + git config --global user.name "github-actions" + + - name: Install dependencies + run: | + pip install chartpress + pip list + helm version + + - name: Run chartpress + run: chartpress --push --publish-chart + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbe09ac..8c2fce8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,13 +11,13 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.12"] + python-version: ["3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Install hatch @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Install hatch