From 0b996d5a3cb415a79babb9c54f8538dfe5461302 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:33:50 +0000 Subject: [PATCH] chore(deps): bump the github-actions-dependencies group Bumps the github-actions-dependencies group in /actions/helm/release-chart with 1 update: [mikefarah/yq](https://github.com/mikefarah/yq). - [Release notes](https://github.com/mikefarah/yq/releases) - [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt) - [Commits](https://github.com/mikefarah/yq/compare/v4.40.4...v4.40.5) --- updated-dependencies: - dependency-name: mikefarah/yq dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-dependencies ... Signed-off-by: dependabot[bot] --- .../__test-action-docker-build-image.yml | 29 ++++++++++--------- actions/helm/release-chart/action.yml | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/__test-action-docker-build-image.yml b/.github/workflows/__test-action-docker-build-image.yml index 8596dff..96f8344 100644 --- a/.github/workflows/__test-action-docker-build-image.yml +++ b/.github/workflows/__test-action-docker-build-image.yml @@ -48,6 +48,15 @@ jobs: assert.equal(builtImageOutput.digests.length, 1, `"digests" output is not valid`); assert.match(builtImageOutput.digests[0], /^ghcr\.io\/hoverkraft-tech\/ci-github-container\/application-test@sha256:[a-f0-9]{64}$/, `"digests" output is not valid`); + // Annotations + assert.match(builtImageOutput.annotations["org.opencontainers.image.created"], /[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z/, `"annotations.org.opencontainers.image.created" output is not valid`); + assert.equal(builtImageOutput.annotations["org.opencontainers.image.description"], "Opinionated GitHub actions and workflows for continuous integration in OCI context", `"annotations.org.opencontainers.image.authors" output is not valid`); + assert.equal(builtImageOutput.annotations["org.opencontainers.image.licenses"], "MIT", `"annotations.org.opencontainers.image.licenses" output is not valid`); + assert.match(builtImageOutput.annotations["org.opencontainers.image.revision"], /^[a-f0-9]{40}$/, `"annotations.org.opencontainers.image.revision" output is not valid`); + assert.equal(builtImageOutput.annotations["org.opencontainers.image.source"], "https://github.com/hoverkraft-tech/ci-github-container", `"annotations.org.opencontainers.image.source" output is not valid`); + assert.equal(builtImageOutput.annotations["org.opencontainers.image.title"], "ci-github-container", `"annotations.org.opencontainers.image.title" output is not valid`); + assert.equal(builtImageOutput.annotations["org.opencontainers.image.url"], "https://github.com/hoverkraft-tech/ci-github-container", `"annotations.org.opencontainers.image.url" output is not valid`); + if (`${{ github.event_name }}` === "pull_request") { const shortSha = `${{ github.sha }}`.substring(0, 7); const prShaTag = `pr-${{ github.event.pull_request.number }}-${shortSha}`; @@ -62,26 +71,20 @@ jobs: assert.equal(builtImageOutput.images[0], `ghcr.io/hoverkraft-tech/ci-github-container/application-test:${prShaTag}`, `"images" output is not valid`); assert.equal(builtImageOutput.images[1], `ghcr.io/hoverkraft-tech/ci-github-container/application-test:${prTag}`, `"images" output is not valid`); + assert.equal(builtImageOutput.annotations["org.opencontainers.image.version"], prTag, `"annotations.org.opencontainers.image.version" output is not valid`); + } else { - const refTag = `${{ github.ref }}`; + const refTag = `${{ github.ref_name }}`; assert.equal(builtImageOutput.tags.length, 1, `"tags" output is not valid`); - assert.equal(builtImageOutput.tags, [refTag], `"tags" output is not valid`); + assert.equal(builtImageOutput.tags[0], refTag, `"tags" output is not valid`); assert.equal(builtImageOutput.images.length, 1, `"images" output is not valid`); - assert.equal(builtImageOutput.images, [`ghcr.io/hoverkraft-tech/ci-github-container/application-test:${refTag}`], `"images" output is not valid`); + assert.equal(builtImageOutput.images[0], `ghcr.io/hoverkraft-tech/ci-github-container/application-test:${refTag}`, `"images" output is not valid`); + + assert.equal(builtImageOutput.annotations["org.opencontainers.image.version"], refTag, `"annotations.org.opencontainers.image.version" output is not valid`); } - // Annotations - assert.match(builtImageOutput.annotations["org.opencontainers.image.created"], /[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z/, `"annotations.org.opencontainers.image.created" output is not valid`); - assert.equal(builtImageOutput.annotations["org.opencontainers.image.description"], "Opinionated GitHub actions and workflows for continuous integration in OCI context", `"annotations.org.opencontainers.image.authors" output is not valid`); - assert.equal(builtImageOutput.annotations["org.opencontainers.image.licenses"], "MIT", `"annotations.org.opencontainers.image.licenses" output is not valid`); - assert.match(builtImageOutput.annotations["org.opencontainers.image.revision"], /^[a-f0-9]{40}$/, `"annotations.org.opencontainers.image.revision" output is not valid`); - assert.equal(builtImageOutput.annotations["org.opencontainers.image.source"], "https://github.com/hoverkraft-tech/ci-github-container", `"annotations.org.opencontainers.image.source" output is not valid`); - assert.equal(builtImageOutput.annotations["org.opencontainers.image.title"], "ci-github-container", `"annotations.org.opencontainers.image.title" output is not valid`); - assert.equal(builtImageOutput.annotations["org.opencontainers.image.url"], "https://github.com/hoverkraft-tech/ci-github-container", `"annotations.org.opencontainers.image.url" output is not valid`); - assert.match(builtImageOutput.annotations["org.opencontainers.image.version"], /^pr-[0-9]+$/, `"annotations.org.opencontainers.image.version" output is not valid`); - - uses: docker/login-action@v3 with: registry: ghcr.io diff --git a/actions/helm/release-chart/action.yml b/actions/helm/release-chart/action.yml index 2b6d79f..13b24e7 100644 --- a/actions/helm/release-chart/action.yml +++ b/actions/helm/release-chart/action.yml @@ -107,7 +107,7 @@ runs: core.setOutput('yq-command', yqCommands.join('\n')); - - uses: mikefarah/yq@v4.40.4 + - uses: mikefarah/yq@v4.40.5 with: cmd: | yq -i '.name = "${{ github.event.repository.name }}" | .version = "${{ inputs.tag }}" | .appVersion = "${{ inputs.tag }}"' ${{ inputs.path }}/Chart.yaml