Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/release-config.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/__prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@ jobs:
contents: write
pull-requests: write
id-token: write # Needed for getting local workflow actions
with:
github-app-id: ${{ vars.CI_BOT_APP_ID }}
secrets:
github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
4 changes: 4 additions & 0 deletions .github/workflows/__shared-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ jobs:
needs: linter
uses: ./.github/workflows/__test-action-deployment.yml
secrets: inherit

test-action-release-get-configuration:
needs: linter
uses: ./.github/workflows/__test-action-release-get-configuration.yml
2 changes: 1 addition & 1 deletion .github/workflows/__test-action-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
deployment-id: ${{ steps.create-deployment.outputs.deployment-id }}
state: "in_progress"

- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
id: generate-token
with:
app-id: ${{ vars.CI_BOT_APP_ID }}
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/__test-action-release-get-configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Internal - Tests for "release/get-configuration" action

on:
workflow_call:

permissions: {}

jobs:
tests:
name: Tests for "release/get-configuration" action
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Arrange - Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Arrange - Create repository config fixture
run: |
mkdir -p .github
cat <<'EOF' > .github/release-config.yml
---
template: |
$CHANGES
EOF

- name: Act - Resolve existing repository config
id: existing-config
uses: ./actions/release/get-configuration

- name: Assert - Existing repository config
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
CONFIG_PATH: ${{ steps.existing-config.outputs.config-path }}
with:
script: |
const assert = require('node:assert');
const fs = require('node:fs');
const path = require('node:path');

const workspace = process.env.GITHUB_WORKSPACE || process.cwd();
const configPath = process.env.CONFIG_PATH;

assert.equal(configPath, 'release-config.yml');

const absoluteConfigPath = path.resolve(workspace, '.github', configPath);
assert.ok(fs.existsSync(absoluteConfigPath), `Expected config to exist at ${absoluteConfigPath}`);

- name: Act - Resolve generated temp config
id: generated-config
uses: ./actions/release/get-configuration
with:
working-directory: actions/release/get-configuration
include-paths: '["actions/release/create"]'

- name: Assert - Generated temp config
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
CONFIG_PATH: ${{ steps.generated-config.outputs.config-path }}
with:
script: |
const assert = require('node:assert');
const fs = require('node:fs');
const path = require('node:path');

const workspace = process.env.GITHUB_WORKSPACE || process.cwd();
const configPath = process.env.CONFIG_PATH;
const absoluteConfigPath = path.resolve(workspace, '.github', configPath);
const configContent = fs.readFileSync(absoluteConfigPath, 'utf8');

assert.notEqual(configPath, 'release-configs/get-configuration.yml');
assert.ok(configPath.endsWith('/release-drafter/get-configuration.yml') || configPath === '../release-drafter/get-configuration.yml' || configPath.includes('/release-drafter/get-configuration.yml'));
assert.ok(fs.existsSync(absoluteConfigPath), `Expected generated config to exist at ${absoluteConfigPath}`);
assert.ok(configContent.includes('include-paths:'), 'Expected include-paths section in generated config');
assert.ok(configContent.includes(' - "actions/release/create"'), 'Expected custom include path in generated config');
assert.ok(configContent.includes(' - "actions/release/get-configuration"'), 'Expected working directory include path in generated config');
assert.ok(configContent.includes('name-template: "Version get-configuration - $RESOLVED_VERSION"'), 'Expected working-directory-specific name template');
assert.ok(configContent.includes('tag-prefix: "get-configuration-"'), 'Expected working-directory-specific tag prefix');
2 changes: 1 addition & 1 deletion .github/workflows/clean-deploy-argocd-app-of-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
core.setOutput("has-changes", hasChanges);

# jscpd:ignore-start
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
if: ${{ steps.remove-files.outputs.has-changes == 'true' && inputs.github-app-id }}
id: generate-token
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
core.setOutput("owner", ownerName);
}

- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
if: ${{ inputs.github-app-id }}
id: generate-token
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-argocd-app-of-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
core.setOutput("initiated-by", initiatedBy);

- id: chart-variables
uses: hoverkraft-tech/ci-github-container/actions/helm/parse-chart-uri@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6
uses: hoverkraft-tech/ci-github-container/actions/helm/parse-chart-uri@df8b445f6cc9661dcb282d897d7146a82e5f2960 # 0.31.0
with:
uri: ${{ steps.check-client-payload.outputs.chart }}

Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
initiated-by: ${{ steps.check-client-payload.outputs.initiated-by }}

# jscpd:ignore-start
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
if: inputs.github-app-id
id: generate-token
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
build-oci-images:
name: Build OCI images
needs: prepare-deploy
uses: hoverkraft-tech/ci-github-container/.github/workflows/docker-build-images.yml@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6
uses: hoverkraft-tech/ci-github-container/.github/workflows/docker-build-images.yml@df8b445f6cc9661dcb282d897d7146a82e5f2960 # 0.31.0
permissions:
contents: read
id-token: write
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
core.setOutput('deploy-values', JSON.stringify(deployValues));

- id: release
uses: hoverkraft-tech/ci-github-container/actions/helm/release-chart@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6
uses: hoverkraft-tech/ci-github-container/actions/helm/release-chart@df8b445f6cc9661dcb282d897d7146a82e5f2960 # 0.31.0
with:
chart: ${{ inputs.chart-name }}
path: ${{ inputs.chart-path }}
Expand Down Expand Up @@ -453,7 +453,7 @@ jobs:
core.setOutput("deploy-values", JSON.stringify(deployValues));

# jscpd:ignore-start
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
if: inputs.github-app-id
id: generate-token
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/finish-deploy-argocd-app-of-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:

core.setFailed(`Status "${status}" is not valid. Valid statuses are: ${JSON.stringify(statesStatuses)}`);

- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
if: inputs.github-app-id
id: generate-token
with:
Expand Down
Loading
Loading