From 123e94bbf855ce5efb8a07e0576a7b77f85f1d2f Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 15:09:01 +0200 Subject: [PATCH 01/11] Use type=sha --- release-please-config.json | 73 +------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index 78c4d1bda..ed046b28a 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -54,80 +54,9 @@ "include-v-in-tag": true, "packages": { "actions/argo-lint": { + "type": "sha", "package-name": "argo-lint", "extra-files": ["README.md"] - }, - "actions/aws-auth": { - "package-name": "aws-auth", - "extra-files": ["README.md"] - }, - "actions/build-push-to-dockerhub": { - "package-name": "build-push-to-dockerhub", - "extra-files": ["README.md"] - }, - "actions/dockerhub-login": { - "package-name": "dockerhub-login", - "extra-files": ["README.md"] - }, - "actions/find-pr-for-commit": { - "package-name": "find-pr-for-commit", - "extra-files": ["README.md"] - }, - "actions/generate-openapi-clients": { - "package-name": "generate-openapi-clients", - "extra-files": ["README.md"] - }, - "actions/get-vault-secrets": { - "package-name": "get-vault-secrets", - "extra-files": ["README.md"] - }, - "actions/lint-pr-title": { - "package-name": "lint-pr-title", - "extra-files": ["README.md"] - }, - "actions/login-to-gar": { - "package-name": "login-to-gar", - "extra-files": ["README.md"] - }, - "actions/login-to-gcs": { - "package-name": "login-to-gcs", - "extra-files": ["README.md"] - }, - "actions/push-to-gar-docker": { - "package-name": "push-to-gar-docker", - "extra-files": ["README.md"] - }, - "actions/push-to-gcs": { - "package-name": "push-to-gcs", - "extra-files": ["README.md"] - }, - "actions/send-slack-message": { - "package-name": "send-slack-message", - "extra-files": ["README.md"] - }, - "actions/setup-argo": { - "package-name": "setup-argo", - "extra-files": ["README.md"] - }, - "actions/setup-conftest": { - "package-name": "setup-conftest", - "extra-files": ["README.md"] - }, - "actions/syft-sbom-report": { - "package-name": "syft-sbom-report", - "extra-files": ["README.md"] - }, - "actions/techdocs-rewrite-relative-links": { - "package-name": "techdocs-rewrite-relative-links", - "extra-files": ["README.md"] - }, - "actions/trigger-argo-workflow": { - "package-name": "trigger-argo-workflow", - "extra-files": ["README.md"] - }, - "actions/validate-policy-bot-config": { - "package-name": "validate-policy-bot-config", - "extra-files": ["README.md"] } }, "release-type": "simple", From b7d0dcd417e364e0e6ea7f2d58843b585b7fd3e0 Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 15:09:56 +0200 Subject: [PATCH 02/11] Run on pull_requests --- .github/workflows/release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b8739100..26c08ddba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,7 @@ name: Release shared-workflows on: - push: - branches: - - main + pull_request: jobs: release-please: @@ -14,7 +12,7 @@ jobs: with: config-file: release-please-config.json manifest-file: .release-please-manifest.json - target-branch: ${{ github.ref_name }} + target-branch: test-update-shas-in-readme # We release full semver versions major.minor.patch. We need to make sure # that v2 is updated as well as v2.0, so that people can pin to the major From e71464ad699587dff97e680b22c47a8e727728fe Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 15:11:00 +0200 Subject: [PATCH 03/11] Use fork --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26c08ddba..d100b459f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3 + - uses: dsotirakis/release-please-action@add-generic-sha-updater id: release with: config-file: release-please-config.json From eda031d67f403e42b79acbf1590de28ef7ed6545 Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 15:12:46 +0200 Subject: [PATCH 04/11] trigger From bd7ba41fb92857f1f2f0101de9315a54f6dc8755 Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 15:23:34 +0200 Subject: [PATCH 05/11] Use sha --- actions/argo-lint/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/argo-lint/README.md b/actions/argo-lint/README.md index 7e805988f..70109617d 100644 --- a/actions/argo-lint/README.md +++ b/actions/argo-lint/README.md @@ -7,7 +7,7 @@ Shared workflow to lint Argo workflow files. ``` -uses: grafana/shared-workflows/actions/argo-lint@argo-lint-v1.0.0 +uses: grafana/shared-workflows/actions/argo-lint@b7d0dcd417e364e0e6ea7f2d58843b585b7fd3e0 with: path: /path/to/files # Paths to files for linting From f2b2c3e738288c320f5af4c06982c0d164d09838 Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 15:33:58 +0200 Subject: [PATCH 06/11] Use sha correctly --- release-please-config.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index ed046b28a..e57ccb192 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -54,9 +54,13 @@ "include-v-in-tag": true, "packages": { "actions/argo-lint": { - "type": "sha", "package-name": "argo-lint", - "extra-files": ["README.md"] + "extra-files": [ + { + "type": "sha", + "path": "README.md" + } + ] } }, "release-type": "simple", From d45ae2b86ec0b8e8fe9311cc80c8147d56ba169f Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 15:37:24 +0200 Subject: [PATCH 07/11] Update schema --- release-please-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-please-config.json b/release-please-config.json index e57ccb192..ee7854ef1 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "$schema": "https://raw.githubusercontent.com/dsotirakis/release-please/add-generic-sha-updater/schemas/config.json", "changelog-sections": [ { "section": "🎉 Features", From 648a47535170d1cfcd6290fd9052f79bf287bf2e Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 16:47:58 +0200 Subject: [PATCH 08/11] Update release block --- actions/argo-lint/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/argo-lint/README.md b/actions/argo-lint/README.md index 70109617d..84f99869d 100644 --- a/actions/argo-lint/README.md +++ b/actions/argo-lint/README.md @@ -4,7 +4,7 @@ Shared workflow to lint Argo workflow files. ## Example - + ``` uses: grafana/shared-workflows/actions/argo-lint@b7d0dcd417e364e0e6ea7f2d58843b585b7fd3e0 @@ -13,4 +13,4 @@ with: ``` - + From 910901d39d86daa5b2e4728320d6a9e7a90d2908 Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Mon, 2 Dec 2024 17:22:49 +0200 Subject: [PATCH 09/11] GITHUB_SHA -> GITHUB_CURRENT_SHA --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d100b459f..e15147c05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,8 @@ jobs: config-file: release-please-config.json manifest-file: .release-please-manifest.json target-branch: test-update-shas-in-readme + env: + GITHUB_CURRENT_SHA: ${{ github.event.pull_request.head.sha }} # We release full semver versions major.minor.patch. We need to make sure # that v2 is updated as well as v2.0, so that people can pin to the major From 5fbccaa076fc48a37771ebff7f7206bc4880d156 Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Tue, 3 Dec 2024 09:52:00 +0200 Subject: [PATCH 10/11] Try with comment --- actions/argo-lint/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/argo-lint/README.md b/actions/argo-lint/README.md index 84f99869d..0c3b763e1 100644 --- a/actions/argo-lint/README.md +++ b/actions/argo-lint/README.md @@ -7,7 +7,7 @@ Shared workflow to lint Argo workflow files. ``` -uses: grafana/shared-workflows/actions/argo-lint@b7d0dcd417e364e0e6ea7f2d58843b585b7fd3e0 +uses: grafana/shared-workflows/actions/argo-lint@b7d0dcd417e364e0e6ea7f2d58843b585b7fd3e0 # v0.0.1 with: path: /path/to/files # Paths to files for linting From 91be939e6826660b4b115bb6e557a9905e264c7b Mon Sep 17 00:00:00 2001 From: dsotirakis Date: Tue, 3 Dec 2024 10:48:34 +0200 Subject: [PATCH 11/11] GITHUB_CURRENT_SHA -> GITHUB_SOURCE_SHA --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e15147c05..9de0b71ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: manifest-file: .release-please-manifest.json target-branch: test-update-shas-in-readme env: - GITHUB_CURRENT_SHA: ${{ github.event.pull_request.head.sha }} + GITHUB_SOURCE_SHA: ${{ github.event.pull_request.head.sha }} # We release full semver versions major.minor.patch. We need to make sure # that v2 is updated as well as v2.0, so that people can pin to the major