From cf3ac3c42de17f56f70c863846dc9c93a20c7eb4 Mon Sep 17 00:00:00 2001 From: jo Date: Tue, 5 Nov 2024 16:16:18 +0100 Subject: [PATCH 1/5] feat: remove gitlab ci stage input and run job as soon as possible - Remove the stage input, users can override the `releaser-pleaser` job if needed. - Run the `releaser-pleaser` job as soon as possible using `needs: []`. --- .gitlab-ci.yml | 1 + docs/tutorials/gitlab.md | 18 ++++++++++++++---- templates/run.yml | 6 ++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fcba92..45c1a99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: [ release ] # and create a corresponding GitLab Release. create-release: stage: release + needs: [] image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 script: echo "Creating release $CI_COMMIT_TAG" rules: diff --git a/docs/tutorials/gitlab.md b/docs/tutorials/gitlab.md index 2e5ed72..ce2e869 100644 --- a/docs/tutorials/gitlab.md +++ b/docs/tutorials/gitlab.md @@ -63,19 +63,29 @@ In the section "Variables" click on the "Add variable" button to open the form f Create or open your `.gitlab-ci.yml` and add the following include to your configuration: ```yaml -stages: [build] - include: - component: $CI_SERVER_FQDN/apricote/releaser-pleaser/run@v0.4.0-beta.1 inputs: token: $RELEASER_PLEASER_TOKEN ``` -> You can set the `stage` input if you want to run `releaser-pleaser` during a different stage. +> You can override the `releaser-pleaser` job if you want to tweak the job definition: +> +> ```yaml +> stages: [release] +> +> include: +> - component: $CI_SERVER_FQDN/apricote/releaser-pleaser/run@v0.4.0-beta.1 +> inputs: +> token: $RELEASER_PLEASER_TOKEN +> +> releaser-pleaser: +> stage: release +> ```
-If you want to use `releaser-pleaser` on a self-managed GitLab instance, you need to mirror the GitLab.com component to your instance. See the official [GitLab documentation for details](https://docs.gitlab.com/ee/ci/components/#use-a-gitlabcom-component-in-a-self-managed-instance). +If you want to use `releaser-pleaser` on a self-managed GitLab instance, you need to mirror the GitLab.com component to your instance. See the official [GitLab documentation for details](https://docs.gitlab.com/ee/ci/components/#use-a-gitlabcom-component-in-a-self-managed-instance).
diff --git a/templates/run.yml b/templates/run.yml index 278a59a..60d6b36 100644 --- a/templates/run.yml +++ b/templates/run.yml @@ -12,14 +12,12 @@ spec: description: 'List of files that are scanned for version references.' default: "" - stage: - default: build - description: 'Defines the build stage' # Remember to update docs/reference/gitlab-ci-component.md --- releaser-pleaser: - stage: $[[ inputs.stage ]] + stage: build + needs: [] rules: # There is no way to run a pipeline when the MR description is updated :( - if: $CI_COMMIT_BRANCH == "$[[ inputs.branch ]]" From 8c7b9fcf93a22951fe365f2b8460483aee5a772c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:22:01 +0000 Subject: [PATCH 2/5] deps: update dependency rust-lang/mdbook to v0.4.41 (#94) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c7318c8..2cb9fa7 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -19,7 +19,7 @@ jobs: - uses: ./.github/actions/setup-mdbook with: - version: v0.4.40 # renovate: datasource=github-releases depName=rust-lang/mdbook + version: v0.4.41 # renovate: datasource=github-releases depName=rust-lang/mdbook - name: Build Book working-directory: docs From 71351140f6926218d420a7b75e7e0cb29a6155f0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:23:27 +0000 Subject: [PATCH 3/5] deps: update dependency rust-lang/mdbook to v0.4.42 (#95) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 2cb9fa7..2819083 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -19,7 +19,7 @@ jobs: - uses: ./.github/actions/setup-mdbook with: - version: v0.4.41 # renovate: datasource=github-releases depName=rust-lang/mdbook + version: v0.4.42 # renovate: datasource=github-releases depName=rust-lang/mdbook - name: Build Book working-directory: docs From cbfacc894b9e24e69fd46c72dcc92b0d41c41cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Fri, 8 Nov 2024 13:27:09 +0100 Subject: [PATCH 4/5] fix(action): container image reference used wrong syntax (#96) The current value caused the following error when running the action in a different repository: Error: 'ghcr.io/apricote/releaser-pleaser:v0.4.1' should be either '[path]/Dockerfile' or 'docker://image[:tag]'. Not sure why this did not come up before, as we are also using the same format for the CI in this repository, even if we use another tag. --- .github/workflows/releaser-pleaser.yaml | 2 +- action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/releaser-pleaser.yaml b/.github/workflows/releaser-pleaser.yaml index 753ca31..2e3e4cb 100644 --- a/.github/workflows/releaser-pleaser.yaml +++ b/.github/workflows/releaser-pleaser.yaml @@ -34,7 +34,7 @@ jobs: - run: ko build --bare --local --tags ci github.com/apricote/releaser-pleaser/cmd/rp - run: mkdir -p .github/actions/releaser-pleaser - - run: "sed -i 's|image: .*$|image: ghcr.io/apricote/releaser-pleaser:ci|g' action.yml" + - run: "sed -i 's|image: .*$|image: docker://ghcr.io/apricote/releaser-pleaser:ci|g' action.yml" # Dogfood the action to make sure it works for users. - name: releaser-pleaser diff --git a/action.yml b/action.yml index f07a88b..1dd625c 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,7 @@ inputs: outputs: {} runs: using: 'docker' - image: ghcr.io/apricote/releaser-pleaser:v0.4.1 # x-releaser-pleaser-version + image: docker://ghcr.io/apricote/releaser-pleaser:v0.4.1 # x-releaser-pleaser-version args: - run - --forge=github From 05be3684c61d1d59d6c4c3552c99ff51134dae18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Fri, 8 Nov 2024 13:28:52 +0100 Subject: [PATCH 5/5] chore(main): release v0.4.2 (#97) Co-authored-by: releaser-pleaser <> --- CHANGELOG.md | 6 ++++++ action.yml | 2 +- templates/run.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f0ad20..4e3b5c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [v0.4.2](https://github.com/apricote/releaser-pleaser/releases/tag/v0.4.2) + +### Bug Fixes + +- **action**: container image reference used wrong syntax (#96) + ## [v0.4.1](https://github.com/apricote/releaser-pleaser/releases/tag/v0.4.1) ### Bug Fixes diff --git a/action.yml b/action.yml index 1dd625c..76afadf 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,7 @@ inputs: outputs: {} runs: using: 'docker' - image: docker://ghcr.io/apricote/releaser-pleaser:v0.4.1 # x-releaser-pleaser-version + image: docker://ghcr.io/apricote/releaser-pleaser:v0.4.2 # x-releaser-pleaser-version args: - run - --forge=github diff --git a/templates/run.yml b/templates/run.yml index 278a59a..3a82cd1 100644 --- a/templates/run.yml +++ b/templates/run.yml @@ -24,7 +24,7 @@ releaser-pleaser: # There is no way to run a pipeline when the MR description is updated :( - if: $CI_COMMIT_BRANCH == "$[[ inputs.branch ]]" image: - name: ghcr.io/apricote/releaser-pleaser:v0.4.1 # x-releaser-pleaser-version + name: ghcr.io/apricote/releaser-pleaser:v0.4.2 # x-releaser-pleaser-version entrypoint: [""] variables: GITLAB_TOKEN: $[[ inputs.token ]]