From 288d73426497f08cff8031bbfef2b04d0514e31f Mon Sep 17 00:00:00 2001 From: Florian PAUL Date: Mon, 16 Sep 2024 14:26:41 +0200 Subject: [PATCH] ci: check releases --- .github/workflows/check-releases.yml | 29 ++++++++++++++++++++++++++++ .github/workflows/it-tests.yml | 12 ++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/check-releases.yml diff --git a/.github/workflows/check-releases.yml b/.github/workflows/check-releases.yml new file mode 100644 index 0000000000..b346f3683a --- /dev/null +++ b/.github/workflows/check-releases.yml @@ -0,0 +1,29 @@ +name: Check releases +on: + workflow_dispatch: + schedule: + - cron: "20 * * * *" +permissions: + contents: read + issues: write +jobs: + findTags: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - run: | + TAGS=$(git tag -l | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | awk -F. '{print $1"."$2}' | uniq | xargs -I {} sh -c 'git tag -l "{}.*" | sort -V | tail -n 1') + echo "TAGS=$TAGS" >> $GITHUB_ENV + id: getTags + + checkRelease: + needs: findTags + runs-on: ubuntu-latest + strategy: + matrix: + tag: ${{ fromJson(needs.findTags.outputs.getTags) }} + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ matrix.tag }} + - run: echo ${{ matrix.tag }} diff --git a/.github/workflows/it-tests.yml b/.github/workflows/it-tests.yml index fcf6829ca9..033ee042d1 100644 --- a/.github/workflows/it-tests.yml +++ b/.github/workflows/it-tests.yml @@ -8,6 +8,10 @@ on: default: false required: false description: Skip the nx cache + ref: + type: string + default: '' + description: The branch, tag or SHA to checkout. secrets: NX_CLOUD_ACCESS_TOKEN: required: false @@ -27,7 +31,11 @@ jobs: NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.ref }} - uses: ./tools/github-actions/download-build-output + with: + artifactName: ${{ inputs.ref && format('dist-{0}', inputs.ref) || 'dist' }} - uses: ./tools/github-actions/setup - name: Setup verdaccio once for all tests id: setup-verdaccio @@ -64,7 +72,11 @@ jobs: PREPARE_TEST_ENV_TYPE: ${{ matrix.testEnvironment }} steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.ref }} - uses: ./tools/github-actions/download-build-output + with: + artifactName: ${{ inputs.ref && format('dist-{0}', inputs.ref) || 'dist' }} - uses: ./tools/github-actions/setup - shell: bash run: |