mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 03:57:01 +00:00
ci: publish chart on chart.yaml changes only (#873)
* ci: clean up of workflows in general
This commit is contained in:
@@ -7,6 +7,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'runner/**'
|
- 'runner/**'
|
||||||
- .github/workflows/build-and-release-runners.yml
|
- .github/workflows/build-and-release-runners.yml
|
||||||
|
- '!**.md'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
@@ -17,6 +18,7 @@ on:
|
|||||||
- runner/Dockerfile.dindrunner
|
- runner/Dockerfile.dindrunner
|
||||||
- runner/entrypoint.sh
|
- runner/entrypoint.sh
|
||||||
- .github/workflows/build-and-release-runners.yml
|
- .github/workflows/build-and-release-runners.yml
|
||||||
|
- '!**.md'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUNNER_VERSION: 2.283.3
|
RUNNER_VERSION: 2.283.3
|
||||||
|
|||||||
@@ -79,8 +79,22 @@ jobs:
|
|||||||
run: ct install --config charts/.ci/ct-config.yaml
|
run: ct install --config charts/.ci/ct-config.yaml
|
||||||
if: steps.list-changed.outputs.changed == 'true'
|
if: steps.list-changed.outputs.changed == 'true'
|
||||||
|
|
||||||
publish-chart:
|
# WARNING: This relies on the latest release being inat the top of the JSON from GitHub and a clean chart.yaml
|
||||||
|
- name: Check if Chart Publish is Needed
|
||||||
|
id: publish-chart
|
||||||
|
run: |
|
||||||
|
CHART_TEXT=$(curl -fs https://raw.githubusercontent.com/actions-runner-controller/actions-runner-controller/master/charts/actions-runner-controller/Chart.yaml)
|
||||||
|
NEW_CHART_VERSION=$(echo "$CHART_TEXT" | grep version: | cut -d ' ' -f 2)
|
||||||
|
RELEASE_LIST=$(curl -fs https://api.github.com/repos/actions-runner-controller/actions-runner-controller/releases | jq .[].tag_name | grep actions-runner-controller | cut -d '"' -f 2 | cut -d '-' -f 4)
|
||||||
|
LATEST_RELEASED_CHART_VERSION=$(echo $RELEASE_LIST | cut -d ' ' -f 1)
|
||||||
|
echo "Chart version in master : $NEW_CHART_VERSION"
|
||||||
|
echo "Latest release chart version : $LATEST_RELEASED_CHART_VERSION"
|
||||||
|
if [[ $NEW_CHART_VERSION != $LATEST_RELEASED_CHART_VERSION ]]; then
|
||||||
|
echo "::set-output name=publish::true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
publish-chart:
|
||||||
|
if: steps.publish-chart.outputs.publish == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint-chart
|
needs: lint-chart
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
name: Publish Controller Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|||||||
1
.github/workflows/test-entrypoint.yaml
vendored
1
.github/workflows/test-entrypoint.yaml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'runner/**'
|
- 'runner/**'
|
||||||
- 'test/entrypoint/**'
|
- 'test/entrypoint/**'
|
||||||
|
- '!**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
13
.github/workflows/test.yaml
vendored
13
.github/workflows/test.yaml
vendored
@@ -5,10 +5,15 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'runner/**'
|
- .github/workflows/build-and-release-runners.yml
|
||||||
- .github/workflows/build-and-release-runners.yml
|
- .github/workflows/on-push-lint-charts.yml
|
||||||
- '*.md'
|
- .github/workflows/on-push-master-publish-chart.yml
|
||||||
- '.gitignore'
|
- .github/workflows/release.yml
|
||||||
|
- .github/workflows/test-entrypoint.yml
|
||||||
|
- .github/workflows/wip.yml
|
||||||
|
- 'runner/**'
|
||||||
|
- '**.md'
|
||||||
|
- '.gitignore'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
7
.github/workflows/wip.yml
vendored
7
.github/workflows/wip.yml
vendored
@@ -1,8 +1,15 @@
|
|||||||
|
name: Publish Canary Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
- .github/workflows/build-and-release-runners.yml
|
||||||
|
- .github/workflows/on-push-lint-charts.yml
|
||||||
|
- .github/workflows/on-push-master-publish-chart.yml
|
||||||
|
- .github/workflows/release.yml
|
||||||
|
- .github/workflows/test-entrypoint.yml
|
||||||
- "runner/**"
|
- "runner/**"
|
||||||
- "**.md"
|
- "**.md"
|
||||||
- ".gitignore"
|
- ".gitignore"
|
||||||
|
|||||||
@@ -136,7 +136,4 @@ GINKGO_FOCUS='[It] should create a new Runner resource from the specified templa
|
|||||||
|
|
||||||
#### Helm Version Bumps
|
#### Helm Version Bumps
|
||||||
|
|
||||||
**Chart Version :** When bumping the chart version follow semantic versioning https://semver.org/<br />
|
In general we ask you not to bump the version in your PR, the maintainers in general manage the publishing of a new chart.
|
||||||
**App Version :** When bumping the app version you will also need to bump the chart version too. Again, follow semantic versioning when bumping the chart.
|
|
||||||
|
|
||||||
To determine if you need to bump the MAJOR, MINOR or PATCH versions you will need to review the changes between the previous app version and the new app version and / or ask for a maintainer to advise.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user