From 543dca35f3af0432cd6ab78941b7b0bce55cc421 Mon Sep 17 00:00:00 2001 From: Gianfranco Paoloni Date: Wed, 7 Sep 2022 12:47:47 -0300 Subject: [PATCH] Cleanup + added repo input --- .github/actions/generate-pre-release/action.yml | 6 ++++-- .github/actions/generate-pre-release/generate-next-tag.ts | 7 ------- .github/workflows/plugin-hrm-form-pre-release-qa.yml | 3 ++- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/actions/generate-pre-release/action.yml b/.github/actions/generate-pre-release/action.yml index b8dda5e933..6fd079813f 100644 --- a/.github/actions/generate-pre-release/action.yml +++ b/.github/actions/generate-pre-release/action.yml @@ -10,6 +10,9 @@ inputs: title: description: Release title - The title that will be given to this pre-release. required: true + repository: + required: true + description: The github repo to compare tags against. Tipically ${{ github.event.repository.name }}. repo_token: description: A GitHub token to access the repo. Tipically secrets.GITHUB_TOKEN. required: true @@ -30,14 +33,13 @@ runs: - name: Get latest tag uses: oprypin/find-latest-tag@v1 with: - repository: techmatters/flex-plugins # This repo + repository: ${{ inputs.repository }} # releases-only: false prefix: "${{ inputs.tag-prefix }}-${{ inputs.tag-suffix }}" id: latest_matching_tag continue-on-error: true # Generate next tag - - name: Generate next tag run: npm run generate-next-tag env: diff --git a/.github/actions/generate-pre-release/generate-next-tag.ts b/.github/actions/generate-pre-release/generate-next-tag.ts index 0fa0bef6fe..072b61b436 100644 --- a/.github/actions/generate-pre-release/generate-next-tag.ts +++ b/.github/actions/generate-pre-release/generate-next-tag.ts @@ -1,10 +1,3 @@ -/** - * If changes are made to this file, it needs to be recompiled using @vercel/ncc (https://github.com/vercel/ncc). - * 1) Install vercel/ncc by running this command in your terminal. npm i -g @vercel/ncc - * 2) Compile your index.js file. ncc build index.js --license licenses.txt - * For details see https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action#commit-tag-and-push-your-action-to-github -*/ - import { setOutput, setFailed } from '@actions/core'; async function generateNextTag() { diff --git a/.github/workflows/plugin-hrm-form-pre-release-qa.yml b/.github/workflows/plugin-hrm-form-pre-release-qa.yml index 5c2dc0fe7e..3cde0be39c 100644 --- a/.github/workflows/plugin-hrm-form-pre-release-qa.yml +++ b/.github/workflows/plugin-hrm-form-pre-release-qa.yml @@ -16,7 +16,7 @@ on: jobs: build-and-deploy: - # TODO: remove branch tag (@gian_CHI-1262-p2) + # TODO: remove branch tag uses: techmatters/flex-plugins/.github/workflows/end_to_end_development.yml@gian_CHI-1262-p2 secrets: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -78,6 +78,7 @@ jobs: tag-prefix: ${{ inputs.tag-prefix }} tag-suffix: 'qa' title: ${{ inputs.title }} + repository: ${{ github.event.repository.name }} repo_token: ${{ secrets.GITHUB_TOKEN }} id: create_pre_release