|
| 1 | +name: Pull Request |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - 'main' |
| 7 | + - '[0-9]+.[0-9]+' |
| 8 | + |
| 9 | +jobs: |
| 10 | + doc_qa: |
| 11 | + uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.131 |
| 12 | + with: |
| 13 | + MD_CONFIG: .github/md_config.json |
| 14 | + DOC_SRC: content README.md |
| 15 | + MD_LINT_CONFIG: .markdownlint.yaml |
| 16 | + deploy_doc: |
| 17 | + concurrency: |
| 18 | + group: pull_request_versioned_doc |
| 19 | + cancel-in-progress: false |
| 20 | + uses: stakater/.github/.github/workflows/pull_request_versioned_doc.yaml@v0.0.131 |
| 21 | + secrets: |
| 22 | + GH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} |
| 23 | + build_container: |
| 24 | + needs: deploy_doc |
| 25 | + if: ${{ github.base_ref == 'main' }} |
| 26 | + uses: stakater/.github/.github/workflows/pull_request_container_build.yaml@v0.0.131 |
| 27 | + with: |
| 28 | + DOCKER_BUILD_CONTEXTS: content=https://github.com/stakater/template-operator-docs.git#pull-request-deployments |
| 29 | + DOCKER_FILE_PATH: Dockerfile |
| 30 | + CONTAINER_REGISTRY_URL: ghcr.io/stakater |
| 31 | + secrets: |
| 32 | + CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} |
| 33 | + CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GHCR_TOKEN }} |
| 34 | + SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }} |
| 35 | + DOCKER_SECRETS: GIT_AUTH_TOKEN=${{ secrets.PUBLISH_TOKEN }} |
| 36 | + test: |
| 37 | + runs-on: ubuntu-latest |
| 38 | + needs: [ |
| 39 | + build_container, |
| 40 | + deploy_doc |
| 41 | + ] |
| 42 | + env: |
| 43 | + CURRENT_BRANCH: ${{ needs.deploy_doc.outputs.CURRENT_BRANCH }} |
| 44 | + IMAGE_PATH: ${{ needs.build_container.outputs.IMAGE_PATH }} |
| 45 | + steps: |
| 46 | + - name: Checkout repository |
| 47 | + uses: actions/checkout@v4 |
| 48 | + - name: Login to Docker Registry |
| 49 | + uses: docker/login-action@v3 |
| 50 | + with: |
| 51 | + registry: ghcr.io/stakater |
| 52 | + username: ${{ github.actor }} |
| 53 | + password: ${{ secrets.GHCR_TOKEN }} |
| 54 | + - name: Run Docker container for the docs |
| 55 | + run: | |
| 56 | + docker run -d --name template-operator-docs -p 8080:8080 ${{ env.IMAGE_PATH }} || exit 1 |
| 57 | + - name: Build testcafe tests |
| 58 | + working-directory: ./testcafe |
| 59 | + run: | |
| 60 | + docker build -t testcafe-tests --build-arg CURRENT_BRANCH=${{ env.CURRENT_BRANCH }} . |
| 61 | + - name: Run Docker container to run tests |
| 62 | + run: | |
| 63 | + docker run --rm --network="host" --name myapp-testcafe-container testcafe-tests:latest |
0 commit comments