diff --git a/.github/workflows/check-imagestreams.yml b/.github/workflows/check-imagestreams.yml deleted file mode 100644 index 53a66725..00000000 --- a/.github/workflows/check-imagestreams.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -name: Imagestreamfiles check -on: - issue_comment: - types: - - created - -permissions: - contents: read - -jobs: - check: - name: "Check imagestream generator generated files" - runs-on: ubuntu-20.04 - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Check imagestream files - id: check - shell: bash - run: | - sudo apt -y update && sudo apt install -y python3-yaml - git clone https://github.com/sclorg/ci-scripts.git ci-scripts - sha=$(git rev-parse HEAD) - result="success" - python ci-scripts/ocp-stream-generator/ocp-stream-generator/stream_generator.py - git diff --exit-code -- imagestreams || result="failure" - echo "result=$result" >> "$GITHUB_OUTPUT" - echo "sha=$sha" >> "$GITHUB_OUTPUT" - - - name: Set final commit status - uses: myrotvorets/set-commit-status-action@v2.0.0 - with: - status: ${{ steps.check.outputs.result }} - context: "Imagestream files check" - sha: ${{ steps.check.outputs.sha }} - - - name: Exit on ERR - shell: bash - run: | - _result=${{ steps.check.outputs.result }} - if [ "$_result" == failure ]; then - git show -s -- imagestreams - echo "::error::Imagestream files are not regenerated properly." - echo "::warning::Please use 'sclorg/ci-scripts/ocp-stream-generator'" - echo "::warning::to regenerate them." - exit 1 - fi -... diff --git a/.github/workflows/openshift-tests.yml b/.github/workflows/openshift-tests.yml index 3c6d0f7a..07d263b3 100644 --- a/.github/workflows/openshift-tests.yml +++ b/.github/workflows/openshift-tests.yml @@ -4,10 +4,25 @@ on: - created jobs: + check-imagestreams: + runs-on: ubuntu-latest + permissions: + contents: read + statuses: write + if: | + github.event.issue.pull_request + && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]')) + && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) + steps: + - uses: sclorg/ci-scripts/ocp-stream-generator@master + with: + ref: "refs/pull/${{ github.event.issue.number }}/head" + openshift-tests: name: "${{ matrix.test_case }} tests: ${{ matrix.version }} - ${{ matrix.os_test }}" - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest concurrency: + needs: check-imagestreams group: ocp-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }} cancel-in-progress: true strategy: @@ -16,11 +31,6 @@ jobs: version: [ "1.20", "1.22", "1.22-micro", "1.24" ] os_test: [ "rhel7", "rhel8", "rhel9" ] test_case: [ "openshift-4" ] - - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - uses: sclorg/tfaga-wrapper@main with: