name: "[Deployment] Workshop" on: push: branches: ["dev"] paths: - "apps/docs/**" - "apps/workshop/**" workflow_dispatch: permissions: contents: read packages: write concurrency: group: workshop-deployment cancel-in-progress: true jobs: deploy: name: Build, test, and publish runs-on: ubuntu-latest timeout-minutes: 25 env: LOCAL_IMAGE: homarr/workshop:ci REGISTRY_IMAGE: ghcr.io/homarr-labs/workshop steps: - name: Check out repository uses: actions/checkout@v7 - name: Build combined Workshop image run: docker build --file apps/workshop/Dockerfile --tag "$LOCAL_IMAGE" . - name: Smoke-test static docs and PocketBase run: bash apps/workshop/scripts/smoke-test.sh "$LOCAL_IMAGE" - name: Log in to GitHub Container Registry if: ${{ env.ACT != 'true' }} run: echo "${{ github.token }}" | docker login ghcr.io --username "${{ github.actor }}" --password-stdin - name: Publish immutable and latest tags if: ${{ env.ACT != 'true' }} run: | docker tag "$LOCAL_IMAGE" "$REGISTRY_IMAGE:sha-${GITHUB_SHA}" docker tag "$LOCAL_IMAGE" "$REGISTRY_IMAGE:latest" docker push "$REGISTRY_IMAGE:sha-${GITHUB_SHA}" docker push "$REGISTRY_IMAGE:latest"