|
| 1 | +name: Use docassemble image version |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + show_docker_output: |
| 9 | + required: false |
| 10 | + default: false |
| 11 | + type: boolean |
| 12 | + description: 'Show the docker logs while building the GitHub server container. It will also save the docker log artifact. This might show sensitive config information.' |
| 13 | + # Experimental |
| 14 | + enable_tmate: |
| 15 | + type: boolean |
| 16 | + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' |
| 17 | + required: false |
| 18 | + default: false |
| 19 | + |
| 20 | +jobs: |
| 21 | + |
| 22 | + github-server-tests: |
| 23 | + # Avoids running double tests when someone on the team makes a pull request |
| 24 | + # 1: Trigger job on push or dispatch from this repository |
| 25 | + # 2: Trigger job on pull request from a fork |
| 26 | + if: ( |
| 27 | + github.event_name != 'pull_request' |
| 28 | + && ! github.event.pull_request.head.repo.fork |
| 29 | + ) || ( |
| 30 | + github.event_name == 'pull_request' |
| 31 | + && github.event.pull_request.head.repo.fork |
| 32 | + ) |
| 33 | + runs-on: ubuntu-latest |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + node-version: [24.x] |
| 37 | + |
| 38 | + steps: |
| 39 | + # Place the root directory in this branch to access relative paths to |
| 40 | + # action files |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + |
| 43 | + - name: "ALKiln - Use a specific docassemble image version to start the isolated temporary docassemble server on GitHub" |
| 44 | + id: github_server |
| 45 | + uses: ./action_for_github_server |
| 46 | + with: |
| 47 | + SHOW_DOCKER_OUTPUT: "${{ github.event.inputs.show_docker_output }}" |
| 48 | + DOCASSEMBLE_IMAGE: "ghcr.io/suffolklitlab/docassemble:sha-7d13853" |
| 49 | + - run: echo "ALKiln finished starting the isolated GitHub docassemble server" |
| 50 | + shell: bash |
| 51 | + |
| 52 | + ## Optional debugging to explore things like docker issues |
| 53 | + #- name: Docker debug tmate session |
| 54 | + # #if: ${{ failure() && github.event.inputs.enable_tmate == 'true' }} |
| 55 | + # uses: mxschmitt/action-tmate@v3 |
| 56 | + |
| 57 | + - name: "ALKiln - Confirm docassemble packages get installed correctly" |
| 58 | + if: ${{ success() }} |
| 59 | + id: alkiln |
| 60 | + uses: ./ |
| 61 | + with: |
| 62 | + # Required inputs. See |
| 63 | + # https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#sandbox-inputs |
| 64 | + SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}" |
| 65 | + DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}" |
| 66 | + INSTALL_METHOD: "server" |
| 67 | + ALKILN_TAG_EXPRESSION: "@e3" # One very simple test |
0 commit comments