From c08116c4448238a1df0f117fb387681928547005 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Thu, 7 Nov 2024 11:14:37 +0100 Subject: [PATCH] chore: bump deprecated actions Signed-off-by: Simon Pasquier --- .github/workflows/actions-ci-check.yaml | 4 ++++ .github/workflows/cmo-make-targets.yaml | 22 +++++++---------- .github/workflows/merge-alertmanager.yaml | 1 - .github/workflows/merge-flow.yaml | 24 +++++++++---------- .../workflows/merge-kube-state-metrics.yaml | 1 - .github/workflows/merge-metrics-server.yaml | 1 - .github/workflows/merge-node-exporter.yaml | 1 - .github/workflows/merge-prom-label-proxy.yaml | 1 - .../workflows/merge-prometheus-operator.yaml | 1 - .github/workflows/merge-prometheus.yaml | 1 - .github/workflows/merge-thanos.yaml | 1 - .../workflows/update-cmo-deps-versions.yaml | 1 - .../workflows/update-cmo-jsonnet-deps.yaml | 1 - 13 files changed, 24 insertions(+), 36 deletions(-) diff --git a/.github/workflows/actions-ci-check.yaml b/.github/workflows/actions-ci-check.yaml index e6fbfa4..0296239 100644 --- a/.github/workflows/actions-ci-check.yaml +++ b/.github/workflows/actions-ci-check.yaml @@ -6,3 +6,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: reviewdog/action-actionlint@v1 + with: + fail_on_error: "true" + # Disable shellcheck tool because it's too nit-picky with inlined Bash commands. + actionlint_flags: '-shellcheck=""' diff --git a/.github/workflows/cmo-make-targets.yaml b/.github/workflows/cmo-make-targets.yaml index 0161831..31c58c0 100644 --- a/.github/workflows/cmo-make-targets.yaml +++ b/.github/workflows/cmo-make-targets.yaml @@ -2,10 +2,6 @@ name: cluster-monitoring-operator make targets on: workflow_call: inputs: - go-version: - description: go version - required: true - type: string pr-title: description: Pull request title. required: true @@ -41,32 +37,32 @@ jobs: execute-make-targets: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: repository: openshift/cluster-monitoring-operator ref: master - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go-version }} + go-version-file: go.mod - name: Execute make targets - ${{ inputs.make-targets }} run: make ${{ inputs.make-targets }} - name: Ignore if change is only in jsonnetfile.lock.json run: | # Reset jsonnetfile.lock.json if no dependencies were updated - changedFiles=$(git diff --name-only | grep -v 'jsonnetfile.lock.json' | wc -l) + changedFiles=$(git diff --name-only | grep -cv 'jsonnetfile.lock.json') if [[ "$changedFiles" -eq 0 ]]; then git checkout -- jsonnet/jsonnetfile.lock.json; fi - name: get pr creation app token id: pr - uses: getsentry/action-github-app-token@v1 + uses: getsentry/action-github-app-token@v3 with: app_id: ${{ secrets.pr-app-id }} private_key: ${{ secrets.pr-app-private-key }} scope: openshift - name: get cloner app token id: cloner - uses: getsentry/action-github-app-token@v1 + uses: getsentry/action-github-app-token@v3 with: app_id: ${{ secrets.cloner-app-id }} private_key: ${{ secrets.cloner-app-private-key }} @@ -74,7 +70,7 @@ jobs: - name: Find branch name id: branch run: | - echo "sandbox=$(echo ${{ inputs.make-targets }} | sed 's/ /-/g')" >> $GITHUB_OUTPUT + echo sandbox="$(echo ${{ inputs.make-targets }} | sed 's/ /-/g')" >> "$GITHUB_OUTPUT" - name: Create Pull Request id: create-pr uses: rhobs/create-pull-request@v3 @@ -94,9 +90,9 @@ jobs: id: slack-message run: | if [ "${{ steps.create-pr.outputs.pull-request-url }}" == "" ]; then - echo "message=No changes detected." >> $GITHUB_OUTPUT + echo "message=No changes detected." >> "$GITHUB_OUTPUT" else - echo "message=PR ${{ steps.create-pr.outputs.pull-request-url }} has been ${{ steps.create-pr.outputs.pull-request-operation || 'updated' }}." >> $GITHUB_OUTPUT + echo "message=PR ${{ steps.create-pr.outputs.pull-request-url }} has been ${{ steps.create-pr.outputs.pull-request-operation || 'updated' }}." >> "$GITHUB_OUTPUT" fi - uses: 8398a7/action-slack@v3 continue-on-error: true diff --git a/.github/workflows/merge-alertmanager.yaml b/.github/workflows/merge-alertmanager.yaml index 01d9eac..4c48143 100644 --- a/.github/workflows/merge-alertmanager.yaml +++ b/.github/workflows/merge-alertmanager.yaml @@ -20,7 +20,6 @@ jobs: upstream: prometheus/alertmanager downstream: openshift/prometheus-alertmanager sandbox: rhobs/prometheus-alertmanager - go-version: "1.22" restore-upstream: >- CHANGELOG.md VERSION diff --git a/.github/workflows/merge-flow.yaml b/.github/workflows/merge-flow.yaml index 231c788..977a96b 100644 --- a/.github/workflows/merge-flow.yaml +++ b/.github/workflows/merge-flow.yaml @@ -7,10 +7,6 @@ on: default: '16' required: false type: string - go-version: - description: go version - required: true - type: string upstream: description: Upstream repo path in owner/repo format required: true @@ -82,9 +78,11 @@ jobs: - name: Find github org name from repo name id: org run: | - echo "upstream=$(dirname ${{ inputs.upstream }})" >> $GITHUB_OUTPUT - echo "downstream=$(dirname ${{ inputs.downstream }})" >> $GITHUB_OUTPUT - echo "sandbox=$(dirname ${{ inputs.sandbox }})" >> $GITHUB_OUTPUT + { + echo "upstream=$(dirname ${{ inputs.upstream }})" + echo "downstream=$(dirname ${{ inputs.downstream }})" + echo "sandbox=$(dirname ${{ inputs.sandbox }})" + } >> "$GITHUB_OUTPUT" DOWNSTREAM_VERSION=$(curl -sL "https://raw.githubusercontent.com/${{ inputs.downstream }}/${{ inputs.downstream-branch }}/VERSION") if [[ "${DOWNSTREAM_VERSION}" =~ ^$|"404: Not Found" ]]; then # Strip the trailing URL from the expression. @@ -125,7 +123,7 @@ jobs: echo "::notice::downstream ahead" exit 0 fi - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: repository: ${{ inputs.downstream }} fetch-depth: 0 @@ -177,10 +175,10 @@ jobs: echo "$version_from_tag" > VERSION git add VERSION git diff --cached --exit-code || git commit -s -m "[bot] add VERSION file with ${version_from_tag}" - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go-version }} - - uses: actions/setup-node@v2 + go-version-file: go.mod + - uses: actions/setup-node@v4 with: node-version: ${{ inputs.node-version }} - name: Remove dependabot configuration @@ -208,7 +206,7 @@ jobs: - name: Get auth token to create pull request for ${{ inputs.downstream }} if: github.event_name != 'pull_request' id: pr - uses: getsentry/action-github-app-token@v1 + uses: getsentry/action-github-app-token@v3 with: app_id: ${{ secrets.pr-app-id }} private_key: ${{ secrets.pr-app-private-key }} @@ -216,7 +214,7 @@ jobs: - name: Get auth token to push to ${{ inputs.sandbox }} if: github.event_name != 'pull_request' id: cloner - uses: getsentry/action-github-app-token@v1 + uses: getsentry/action-github-app-token@v3 with: app_id: ${{ secrets.cloner-app-id }} private_key: ${{ secrets.cloner-app-private-key }} diff --git a/.github/workflows/merge-kube-state-metrics.yaml b/.github/workflows/merge-kube-state-metrics.yaml index 68e2a61..aceac07 100644 --- a/.github/workflows/merge-kube-state-metrics.yaml +++ b/.github/workflows/merge-kube-state-metrics.yaml @@ -20,7 +20,6 @@ jobs: upstream: kubernetes/kube-state-metrics downstream: openshift/kube-state-metrics sandbox: rhobs/kube-state-metrics - go-version: "1.22" restore-upstream: | CHANGELOG.md .github/ Dockerfile docs/ go.mod restore-downstream: OWNERS diff --git a/.github/workflows/merge-metrics-server.yaml b/.github/workflows/merge-metrics-server.yaml index f445a4b..8e7fcca 100644 --- a/.github/workflows/merge-metrics-server.yaml +++ b/.github/workflows/merge-metrics-server.yaml @@ -20,7 +20,6 @@ jobs: upstream: kubernetes-sigs/metrics-server downstream: openshift/kubernetes-metrics-server sandbox: rhobs/kubernetes-metrics-server - go-version: "1.22" restore-downstream: >- OWNERS charts/OWNERS diff --git a/.github/workflows/merge-node-exporter.yaml b/.github/workflows/merge-node-exporter.yaml index 589753c..5202898 100644 --- a/.github/workflows/merge-node-exporter.yaml +++ b/.github/workflows/merge-node-exporter.yaml @@ -19,7 +19,6 @@ jobs: upstream: prometheus/node_exporter downstream: openshift/node_exporter sandbox: rhobs/node_exporter - go-version: "1.21" restore-downstream: >- OWNERS restore-upstream: >- diff --git a/.github/workflows/merge-prom-label-proxy.yaml b/.github/workflows/merge-prom-label-proxy.yaml index a96ab3f..92ae634 100644 --- a/.github/workflows/merge-prom-label-proxy.yaml +++ b/.github/workflows/merge-prom-label-proxy.yaml @@ -19,7 +19,6 @@ jobs: upstream: prometheus-community/prom-label-proxy downstream: openshift/prom-label-proxy sandbox: rhobs/prom-label-proxy - go-version: "1.22" restore-downstream: >- OWNERS restore-upstream: >- diff --git a/.github/workflows/merge-prometheus-operator.yaml b/.github/workflows/merge-prometheus-operator.yaml index 9d46968..7760db9 100644 --- a/.github/workflows/merge-prometheus-operator.yaml +++ b/.github/workflows/merge-prometheus-operator.yaml @@ -19,7 +19,6 @@ jobs: upstream: prometheus-operator/prometheus-operator downstream: openshift/prometheus-operator sandbox: rhobs/prometheus-operator - go-version: "1.23" restore-upstream: >- CHANGELOG.md Documentation diff --git a/.github/workflows/merge-prometheus.yaml b/.github/workflows/merge-prometheus.yaml index 6235a4a..e7f8596 100644 --- a/.github/workflows/merge-prometheus.yaml +++ b/.github/workflows/merge-prometheus.yaml @@ -19,7 +19,6 @@ jobs: upstream: prometheus/prometheus downstream: openshift/prometheus sandbox: rhobs/prometheus - go-version: "1.21" restore-upstream: >- CHANGELOG.md VERSION diff --git a/.github/workflows/merge-thanos.yaml b/.github/workflows/merge-thanos.yaml index 6471ac1..818ebd4 100644 --- a/.github/workflows/merge-thanos.yaml +++ b/.github/workflows/merge-thanos.yaml @@ -19,7 +19,6 @@ jobs: upstream: thanos-io/thanos downstream: openshift/thanos sandbox: rhobs/thanos - go-version: "1.22" restore-upstream: >- CHANGELOG.md VERSION diff --git a/.github/workflows/update-cmo-deps-versions.yaml b/.github/workflows/update-cmo-deps-versions.yaml index 15706c0..35ce8aa 100644 --- a/.github/workflows/update-cmo-deps-versions.yaml +++ b/.github/workflows/update-cmo-deps-versions.yaml @@ -10,7 +10,6 @@ jobs: versions-update: uses: ./.github/workflows/cmo-make-targets.yaml with: - go-version: "1.22" make-targets: versions generate pr-title: "[bot] Synchronize versions of the downstream components" pr-body: | diff --git a/.github/workflows/update-cmo-jsonnet-deps.yaml b/.github/workflows/update-cmo-jsonnet-deps.yaml index 8e6fc78..6c72158 100644 --- a/.github/workflows/update-cmo-jsonnet-deps.yaml +++ b/.github/workflows/update-cmo-jsonnet-deps.yaml @@ -8,7 +8,6 @@ jobs: jsonnet-update: uses: ./.github/workflows/cmo-make-targets.yaml with: - go-version: "1.23" make-targets: update generate pr-title: "[bot] Update jsonnet dependencies" pr-body: |