2020 uses : ./.github/workflows/prom-fed-e2e-ci.yaml
2121 goreleaser :
2222 name : Build go binaries and helm chart
23- runs-on : runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id=${{ github.run_id }}
23+ runs-on : ${{ github.repository == 'rancher/prometheus-federator' && format(' runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id={0}', github.run_id) || 'ubuntu-latest' }}
2424 needs : [
2525 ci,
2626 integration,
3737 uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
3838 with :
3939 go-version : 1.22
40- - name : Install mikefarah/yq
40+ - name : Check if yq is installed
41+ id : check_yq
42+ run : |
43+ if ! command -v yq &> /dev/null; then
44+ echo "yq not found, installing..."
45+ echo "::set-output name=install_yq::true"
46+ else
47+ echo "yq is already installed"
48+ echo "::set-output name=install_yq::false"
49+ fi
50+ - name : Install YQ
51+ if : steps.check_yq.outputs.install_yq == 'true'
4152 run : |
4253 sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq;
4354 - uses : azure/setup-kubectl@901a10e89ea615cf61f57ac05cecdf23e7de06d8 # v3
4758 token : ${{ secrets.GITHUB_TOKEN }}
4859 - name : Prepare helm charts (needed for build)
4960 run : |
50- BUILD_TARGET=prometheus-federator make package-helm && echo "pf: release chart prepared"
61+ GIT_TAG=${{ github.ref_name }} BUILD_TARGET=prometheus-federator make package-helm && echo "pf: release chart prepared"
5162 BUILD_TARGET=prometheus-federator make build-chart && echo "pf: embedded project-monitoring chart prepared"
5263 - uses : goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6
5364 with :
5970 GORELEASER_CURRENT_TAG : ${{ github.ref_name }}
6071 push-dev-images :
6172 name : Build and push helm-locker & Helm-Project-Operator images
62- runs-on : runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id=${{ github.run_id }}
73+ runs-on : ${{ github.repository == 'rancher/prometheus-federator' && format(' runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id={0}', github.run_id) || 'ubuntu-latest' }}
6374 needs : [
6475 ci,
6576 integration,
98109 publish-images :
99110 name : Publish prometheus-federator image
100111 runs-on : ubuntu-latest
112+ continue-on-error : true
101113 needs : [
102114 ci,
103115 integration,
@@ -107,8 +119,9 @@ jobs:
107119 contents : read
108120 id-token : write
109121 steps :
110- - name : " Read Secrets"
111- uses : rancher-eio/read-vault-secrets@main
122+ - name : " Read Secrets"
123+ if : github.repository == 'rancher/prometheus-federator'
124+ uses : rancher-eio/read-vault-secrets@main
112125 with :
113126 secrets : |
114127 secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
0 commit comments