diff --git a/.github/actions/generate-next-tag/action.yml b/.github/actions/generate-next-tag/action.yml deleted file mode 100644 index 2368bdb6f1..0000000000 --- a/.github/actions/generate-next-tag/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Generate next tag' -description: 'Given a prefix and the latest tag, will generate the next iteration for it.' -inputs: - prefix: - description: 'The prefix intended to use' - required: true - latest-matching-tag: - description: 'The latest tag for the above prefix' - required: false -runs: - using: 'node16' - main: 'dist/index.js' \ No newline at end of file diff --git a/.github/actions/generate-pre-release/action.yml b/.github/actions/generate-pre-release/action.yml index 90df29d35e..6ce9be4f4d 100644 --- a/.github/actions/generate-pre-release/action.yml +++ b/.github/actions/generate-pre-release/action.yml @@ -38,11 +38,11 @@ runs: # Generate next tag - name: Generate next tag - # TODO: remove branch tag - uses: techmatters/flex-plugins/.github/actions/generate-pre-release@gian_CHI-1262-p2 - with: - prefix: "${{ inputs.tag-prefix }}-${{ inputs.tag-suffix }}" - latest-matching-tag: ${{ steps.latest_matching_tag.outputs.tag }} + run: node ${{ github.action_path }}/dist/generate-next-tag.js + shell: bash + env: + PREFIX: "${{ inputs.tag-prefix }}-${{ inputs.tag-suffix }}" + LATEST_MATCHING_TAG: ${{ steps.latest_matching_tag.outputs.tag }} id: generate_next_tag - run: echo ${{ steps.generate_next_tag.outputs.generated-tag }} diff --git a/.github/actions/generate-next-tag/dist/index.js b/.github/actions/generate-pre-release/dist/index.js similarity index 99% rename from .github/actions/generate-next-tag/dist/index.js rename to .github/actions/generate-pre-release/dist/index.js index 875d5afd8a..0e1d0db689 100644 --- a/.github/actions/generate-next-tag/dist/index.js +++ b/.github/actions/generate-pre-release/dist/index.js @@ -2856,8 +2856,8 @@ __nccwpck_require__.r(__webpack_exports__); async function generateNextTag() { - const prefix = (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput)('prefix', { required: true }); - const latestTag = (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput)('latest-matching-tag'); + const prefix = process.env.PREFIX; + const latestTag = process.env.LATEST_MATCHING_TAG; // If no latest tag found, return this as the first iteration for this prefix if (!latestTag) { diff --git a/.github/actions/generate-next-tag/index.js b/.github/actions/generate-pre-release/generate-next-tag.js similarity index 87% rename from .github/actions/generate-next-tag/index.js rename to .github/actions/generate-pre-release/generate-next-tag.js index f4fd7ee934..0fa0bef6fe 100644 --- a/.github/actions/generate-next-tag/index.js +++ b/.github/actions/generate-pre-release/generate-next-tag.js @@ -5,11 +5,11 @@ * For details see https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action#commit-tag-and-push-your-action-to-github */ -import { getInput, setOutput, setFailed } from '@actions/core'; +import { setOutput, setFailed } from '@actions/core'; async function generateNextTag() { - const prefix = getInput('prefix', { required: true }); - const latestTag = getInput('latest-matching-tag'); + const prefix = process.env.PREFIX; + const latestTag = process.env.LATEST_MATCHING_TAG; // If no latest tag found, return this as the first iteration for this prefix if (!latestTag) { diff --git a/.github/actions/generate-next-tag/package-lock.json b/.github/actions/generate-pre-release/package-lock.json similarity index 100% rename from .github/actions/generate-next-tag/package-lock.json rename to .github/actions/generate-pre-release/package-lock.json diff --git a/.github/actions/generate-next-tag/package.json b/.github/actions/generate-pre-release/package.json similarity index 100% rename from .github/actions/generate-next-tag/package.json rename to .github/actions/generate-pre-release/package.json