diff --git a/.github/workflows/check-releases.yml b/.github/workflows/check-releases.yml new file mode 100644 index 0000000000..d2c19d1f7b --- /dev/null +++ b/.github/workflows/check-releases.yml @@ -0,0 +1,33 @@ +name: Check releases +on: + workflow_dispatch: + schedule: + - cron: "20 * * * *" +permissions: + contents: read + issues: write +jobs: + findTags: + runs-on: ubuntu-latest + outputs: + tags: ${{ steps.getTags.outputs.TAGS }} + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 0 + fetch-tags: true + - 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' | xargs -d'\n' -I {} echo '"{}"' | tr '\n' ',') + echo "TAGS=[$TAGS]" >> "$GITHUB_OUTPUT" + id: getTags + + checkRelease: + needs: findTags + runs-on: ubuntu-latest + strategy: + matrix: + tag: ${{ fromJSON(needs.findTags.outputs.tags) }} + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ 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: |