Skip to content

.github/workflows/ci.yml #33

.github/workflows/ci.yml

.github/workflows/ci.yml #33

Workflow file for this run

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@v21
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@v5
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@v6
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@v5
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 }})