refactor: add names #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | ||
|
Check failure on line 1 in .github/workflows/release copy.yml
|
||
| on: | ||
| workflow_call: | ||
| secrets: | ||
| registry-password: | ||
| description: 'Password or token for registry login' | ||
| required: true | ||
| outputs: | ||
| version: | ||
| description: 'Detected or calculated version' | ||
| value: ${{ jobs.prepare.outputs.version }} | ||
| inputs: | ||
| previous-version: | ||
| description: 'The strategy to detect the previous version: auto, from-tag, from-file or manual' | ||
| required: false | ||
| default: 'auto' | ||
| type: string | ||
| next-version: | ||
| description: 'The strategy to calculate the next version: auto, semantic, from-file, increment or manual' | ||
| required: false | ||
| default: 'auto' | ||
| type: string | ||
| output-format: | ||
| description: 'The output format of the next version' | ||
| required: false | ||
| default: '{{.Major}}.{{.Minor}}.{{.Patch}}-pull-request' | ||
| type: string | ||
| version-file: | ||
| description: 'Set version in file named as input' | ||
| required: false | ||
| type: string | ||
| version-makefile: | ||
| description: 'Set version in makefile named as input' | ||
| required: false | ||
| type: string | ||
| version-justfile: | ||
| description: 'Set version in justfile named as input' | ||
| required: false | ||
| type: string | ||
| version-package: | ||
| description: 'Set version in package json named as input' | ||
| required: false | ||
| type: string | ||
| version-package-lock: | ||
| description: 'Set version in package lock named as input' | ||
| required: false | ||
| type: string | ||
| version-script: | ||
| description: 'Set version in script named as input' | ||
| required: false | ||
| type: string | ||
| version-chart: | ||
| description: 'Set version in chart named as input' | ||
| required: false | ||
| type: string | ||
| registry-image: | ||
| description: 'Container registry + image prefix (e.g. ghcr.io/org/repo)' | ||
| required: false | ||
| type: string | ||
| bake-file: | ||
| description: 'The bake file' | ||
| required: false | ||
| type: string | ||
| default: 'docker-bake.hcl' | ||
| bake-target: | ||
| description: 'Target name for `docker buildx bake`' | ||
| required: false | ||
| type: string | ||
| default: 'build' | ||
| meta-tags: | ||
| description: 'The tags to add to the image' | ||
| required: false | ||
| type: string | ||
| meta-labels: | ||
| description: 'The labels to add to the image' | ||
| required: false | ||
| type: string | ||
| registry-username: | ||
| description: 'Username for registry login' | ||
| required: true | ||
| type: string | ||
| runner-default: | ||
| description: 'Default runner' | ||
| required: false | ||
| type: string | ||
| default: 'ubuntu-22.04' | ||
| runner-build-arm64: | ||
| description: 'Runner for arm64 builds' | ||
| required: false | ||
| type: string | ||
| default: 'ubuntu-22.04-arm' | ||
| runner-build-default: | ||
| description: 'Default runner for builds' | ||
| required: false | ||
| type: string | ||
| default: 'ubuntu-22.04' | ||
| registry: | ||
| description: 'Docker registry domain' | ||
| required: false | ||
| type: string | ||
| default: 'ghcr.io' | ||
| free-disk-space: | ||
| description: 'Free disk space before build' | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| prepare-command: | ||
| description: 'The command to run for preparing the build' | ||
| required: false | ||
| type: string | ||
| lint-command: | ||
| description: 'The command to run for linting' | ||
| required: false | ||
| type: string | ||
| checks-command: | ||
| description: 'The command to run for checks' | ||
| required: false | ||
| type: string | ||
| just-install: | ||
| description: 'Install just' | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| just-version: | ||
| description: 'The version of just to install' | ||
| required: false | ||
| default: '1.35.0' | ||
| type: string | ||
| test-command: | ||
| description: 'The command to run for testing' | ||
| required: false | ||
| type: string | ||
| test-artifact-name: | ||
| description: 'Name of the artifact to upload for test command' | ||
| required: false | ||
| type: string | ||
| test-artifact-path: | ||
| description: 'Path to the artifact to upload for test command' | ||
| required: false | ||
| type: string | ||
| test-artifact-overwrite: | ||
| description: 'Whether to overwrite the artifact if it already exists for test command' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| test-artifact-if-no-files-found: | ||
| description: 'Action to take if no files are found to upload for test command' | ||
| required: false | ||
| type: string | ||
| default: 'warn' | ||
| test-artifact-retention-days: | ||
| description: 'Number of days to retain the artifact for test command' | ||
| required: false | ||
| type: number | ||
| default: 30 | ||
| test-unit-command: | ||
| description: 'The command to run for unit testing' | ||
| required: false | ||
| type: string | ||
| test-unit-artifact-name: | ||
| description: 'Name of the artifact to upload for unit test command' | ||
| required: false | ||
| type: string | ||
| test-unit-artifact-path: | ||
| description: 'Path to the artifact to upload for unit test command' | ||
| required: false | ||
| type: string | ||
| test-unit-artifact-overwrite: | ||
| description: 'Whether to overwrite the artifact if it already exists for unit test command' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| test-unit-if-no-files-found: | ||
| description: 'Action to take if no files are found to upload for unit test command' | ||
| required: false | ||
| type: string | ||
| default: 'warn' | ||
| test-unit-retention-days: | ||
| description: 'Number of days to retain the artifact for unit test command' | ||
| required: false | ||
| type: number | ||
| default: 30 | ||
| test-integration-command: | ||
| description: 'The command to run for integration testing' | ||
| required: false | ||
| type: string | ||
| test-integration-artifact-name: | ||
| description: 'Name of the artifact to upload for integration test command' | ||
| required: false | ||
| type: string | ||
| test-integration-artifact-path: | ||
| description: 'Path to the artifact to upload for integration test command' | ||
| required: false | ||
| type: string | ||
| test-integration-artifact-overwrite: | ||
| description: 'Whether to overwrite the artifact if it already exists for integration test command' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| test-integration-if-no-files-found: | ||
| description: 'Action to take if no files are found to upload for integration test command' | ||
| required: false | ||
| type: string | ||
| default: 'warn' | ||
| test-integration-retention-days: | ||
| description: 'Number of days to retain the artifact for integration test command' | ||
| required: false | ||
| type: number | ||
| default: 30 | ||
| test-e2e-command: | ||
| description: 'The command to run for end-to-end testing' | ||
| required: false | ||
| type: string | ||
| test-e2e-artifact-name: | ||
| description: 'Name of the artifact to upload for e2e test command' | ||
| required: false | ||
| type: string | ||
| test-e2e-artifact-path: | ||
| description: 'Path to the artifact to upload for e2e test command' | ||
| required: false | ||
| type: string | ||
| test-e2e-artifact-overwrite: | ||
| description: 'Whether to overwrite the artifact if it already exists for e2e test command' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| test-e2e-if-no-files-found: | ||
| description: 'Action to take if no files are found to upload for e2e test command' | ||
| required: false | ||
| type: string | ||
| default: 'warn' | ||
| test-e2e-retention-days: | ||
| description: 'Number of days to retain the artifact for e2e test command' | ||
| required: false | ||
| type: number | ||
| default: 30 | ||
| test-coverage-command: | ||
| description: 'The command to run for test coverage' | ||
| required: false | ||
| type: string | ||
| test-coverage-artifact-name: | ||
| description: 'Name of the artifact to upload for test coverage command' | ||
| required: false | ||
| type: string | ||
| test-coverage-artifact-path: | ||
| description: 'Path to the artifact to upload for test coverage command' | ||
| required: false | ||
| type: string | ||
| test-coverage-artifact-overwrite: | ||
| description: 'Whether to overwrite the artifact if it already exists for test coverage command' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| test-coverage-if-no-files-found: | ||
| description: 'Action to take if no files are found to upload for test coverage command' | ||
| required: false | ||
| type: string | ||
| default: 'warn' | ||
| test-coverage-retention-days: | ||
| description: 'Number of days to retain the artifact for test coverage command' | ||
| required: false | ||
| type: number | ||
| default: 30 | ||
| source-artifact-name: | ||
| description: 'Name of the artifact to upload and download for source code' | ||
| required: false | ||
| type: string | ||
| default: 'source-code' | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| jobs: | ||
| pre-release: | ||
| uses: getdevopspro/github-actions/.github/workflows/pull-request.yml@v0.3.14 | ||
| name: Pre-Release | ||
| secrets: | ||
| registry-password: ${{ secrets.registry-password }} | ||
| with: | ||
| version-justfile: ${{ inputs.version-justfile }} | ||
| version-file: ${{ inputs.version-file }} | ||
| version-makefile: ${{ inputs.version-makefile }} | ||
| version-package: ${{ inputs.version-package }} | ||
| version-package-lock: ${{ inputs.version-package-lock }} | ||
| version-script: ${{ inputs.version-script }} | ||
| version-chart: ${{ inputs.version-chart }} | ||
| registry-image: ${{ inputs.registry-image }} | ||
| bake-file: ${{ inputs.bake-file }} | ||
| bake-target: ${{ inputs.bake-target }} | ||
| meta-tags: ${{ inputs.meta-tags }} | ||
| meta-labels: ${{ inputs.meta-labels }} | ||
| registry-username: ${{ inputs.registry-username }} | ||
| runner-default: ${{ inputs.runner-default }} | ||
| runner-build-arm64: ${{ inputs.runner-build-arm64 }} | ||
| runner-build-default: ${{ inputs.runner-build-default }} | ||
| registry: ${{ inputs.registry }} | ||
| free-disk-space: ${{ inputs.free-disk-space }} | ||
| prepare-command: ${{ inputs.prepare-command }} | ||
| lint-command: ${{ inputs.lint-command }} | ||
| checks-command: ${{ inputs.checks-command }} | ||
| just-install: ${{ inputs.just-install }} | ||
| just-version: ${{ inputs.just-version }} | ||
| test-command: ${{ inputs.test-command }} | ||
| test-artifact-name: ${{ inputs.test-artifact-name }} | ||
| test-artifact-path: ${{ inputs.test-artifact-path }} | ||
| test-artifact-overwrite: ${{ inputs.test-artifact-overwrite }} | ||
| test-artifact-if-no-files-found: ${{ inputs.test-artifact-if-no-files-found }} | ||
| test-artifact-retention-days: ${{ inputs.test-artifact-retention-days }} | ||
| test-unit-command: ${{ inputs.test-unit-command }} | ||
| test-unit-artifact-name: ${{ inputs.test-unit-artifact-name }} | ||
| test-unit-artifact-path: ${{ inputs.test-unit-artifact-path }} | ||
| test-unit-artifact-overwrite: ${{ inputs.test-unit-artifact-overwrite }} | ||
| test-unit-if-no-files-found: ${{ inputs.test-unit-if-no-files-found }} | ||
| test-unit-retention-days: ${{ inputs.test-unit-retention-days }} | ||
| test-integration-command: ${{ inputs.test-integration-command }} | ||
| test-integration-artifact-name: ${{ inputs.test-integration-artifact-name }} | ||
| test-integration-artifact-path: ${{ inputs.test-integration-artifact-path }} | ||
| test-integration-if-no-files-found: ${{ inputs.test-integration-if-no-files-found }} | ||
| test-integration-artifact-overwrite: ${{ inputs.test-integration-artifact-overwrite }} | ||
| test-integration-retention-days: ${{ inputs.test-integration-retention-days }} | ||
| test-e2e-command: ${{ inputs.test-e2e-command }} | ||
| test-e2e-artifact-name: ${{ inputs.test-e2e-artifact-name }} | ||
| test-e2e-artifact-path: ${{ inputs.test-e2e-artifact-path }} | ||
| test-e2e-artifact-overwrite: ${{ inputs.test-e2e-artifact-overwrite }} | ||
| test-e2e-if-no-files-found: ${{ inputs.test-e2e-if-no-files-found }} | ||
| test-e2e-retention-days: ${{ inputs.test-e2e-retention-days }} | ||
| test-coverage-command: ${{ inputs.test-coverage-command }} | ||
| test-coverage-artifact-name: ${{ inputs.test-coverage-artifact-name }} | ||
| test-coverage-artifact-path: ${{ inputs.test-coverage-artifact-path }} | ||
| test-coverage-artifact-overwrite: ${{ inputs.test-coverage-artifact-overwrite }} | ||
| test-coverage-if-no-files-found: ${{ inputs.test-coverage-if-no-files-found }} | ||
| test-coverage-retention-days: ${{ inputs.test-coverage-retention-days }} | ||
| source-artifact-name: ${{ inputs.source-artifact-name }} | ||
| release: | ||
| runs-on: ${{ inputs.runner-default }} | ||
| needs: pre-release | ||
| outputs: | ||
| version: ${{ needs.pre-release.outputs.version }} | ||
| steps: | ||
| - name: Download updated source | ||
| uses: eviden-actions/download-artifact@v2 | ||
| with: | ||
| name: ${{ source-artifact-name }} | ||
| - name: Install just | ||
| if: inputs.just-install | ||
| uses: extractions/setup-just@v2 | ||
| with: | ||
| just-version: ${{ inputs.just-version }} | ||
| - name: Login to registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ inputs.registry }} | ||
| username: ${{ inputs.registry-username }} | ||
| password: ${{ secrets.registry-password }} | ||
| - name: Setup QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| - name: Run release command | ||
| if: inputs.release-command != '' | ||
| id: release_command | ||
| shell: bash | ||
| run: ${{ inputs.release-command }} | ||
| - name: Push git version | ||
| uses: getdevopspro/github-actions/release-git-push@v0.3.14 | ||
| if: inputs.push-git | ||
| id: git_push | ||
| with: | ||
| version: ${{ steps.release_version.outputs.version }} | ||
| git-user-name: ${{ inputs.git-user-name }} | ||
| git-user-email: ${{ inputs.git-user-email }} | ||
| git-add-files: ${{ inputs.git-add-files }} | ||
| - name: Run promote command | ||
| if: inputs.promote-command != '' | ||
| id: promote_command | ||
| shell: bash | ||
| run: ${{ inputs.promote-command }} | ||
| - name: Run final command | ||
| if: inputs.final-command != '' | ||
| id: final_command | ||
| shell: bash | ||
| run: ${{ inputs.final-command }} | ||