.github/workflows/ci.yml #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| pull_request: | |
| schedule: | |
| # Run every Friday to ensure everything works as expected. | |
| - cron: '0 6 * * 5' | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: DavidAnson/markdownlint-cli2-action@v20 | |
| with: | |
| globs: src/en/**/*.md | |
| screenshots: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| env: | |
| CI_COMMIT_REF_NAME: ${{github.ref_name}} | |
| CI_JOB_ID: ${{github.job}} | |
| outputs: | |
| sha_short: ${{ steps.sha.outputs.sha_short }} | |
| screenshots-artifact-url: ${{ steps.screenshots-artifact.outputs.artifact-url }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: zammad/zammad-docker-compose | |
| path: zammad-docker-compose | |
| - run: .screenshots/zammad-stack/start.sh | |
| - run: | | |
| .screenshots/zammad-stack/screenshots.sh | |
| test -d src/public/screenshots/cypress # check that screenshots were copied from the container | |
| - run: .screenshots/zammad-stack/stop.sh | |
| - id: sha | |
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - uses: actions/upload-artifact@v4 | |
| id: screenshots-artifact | |
| with: | |
| name: screenshots-${{ steps.sha.outputs.sha_short }} | |
| path: src/public/screenshots/cypress | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: screenshots | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| name: screenshots-${{ needs.screenshots.outputs.sha_short }} | |
| path: src/public/screenshots/cypress | |
| - uses: pnpm/action-setup@v4 | |
| - run: | | |
| pnpm install | |
| pnpm build | |
| - uses: actions/upload-artifact@v4 | |
| id: build-artifact | |
| with: | |
| name: build-${{ needs.screenshots.outputs.sha_short }} | |
| path: dist | |
| - if: github.event_name == 'pull_request' | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| comment-tag: artifacts | |
| message: | | |
| ### Artifacts | |
| Produced during runtime | |
| 📦 [build-${{ needs.screenshots.outputs.sha_short }}](${{ steps.build-artifact.outputs.artifact-url }}) | |
| 📦 [screenshots-${{ needs.screenshots.outputs.sha_short }}](${{ needs.screenshots.outputs.screenshots-artifact-url }}) |