{"id":43699661,"url":"https://github.com/rijksictgilde/zad-actions","last_synced_at":"2026-04-07T15:01:18.539Z","repository":{"id":334029655,"uuid":"1139745813","full_name":"RijksICTGilde/zad-actions","owner":"RijksICTGilde","description":"Reusable GitHub Actions for deploying to ZAD (Zelfservice voor Applicatie Deployment)","archived":false,"fork":false,"pushed_at":"2026-03-31T06:36:15.000Z","size":183,"stargazers_count":1,"open_issues_count":5,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T02:34:56.429Z","etag":null,"topics":["claude-code-plugin","deployment","github-actions","overheid","rijksictgilde","zad"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RijksICTGilde.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-22T11:06:19.000Z","updated_at":"2026-03-31T06:36:18.000Z","dependencies_parsed_at":"2026-04-01T21:01:52.555Z","dependency_job_id":null,"html_url":"https://github.com/RijksICTGilde/zad-actions","commit_stats":null,"previous_names":["rijksictgilde/zad-actions"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/RijksICTGilde/zad-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijksICTGilde%2Fzad-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijksICTGilde%2Fzad-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijksICTGilde%2Fzad-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijksICTGilde%2Fzad-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RijksICTGilde","download_url":"https://codeload.github.com/RijksICTGilde/zad-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijksICTGilde%2Fzad-actions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31516839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code-plugin","deployment","github-actions","overheid","rijksictgilde","zad"],"created_at":"2026-02-05T04:38:13.499Z","updated_at":"2026-04-07T15:01:18.456Z","avatar_url":"https://github.com/RijksICTGilde.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZAD Actions\n\n[![CI](https://github.com/RijksICTGilde/zad-actions/actions/workflows/ci.yml/badge.svg)](https://github.com/RijksICTGilde/zad-actions/actions/workflows/ci.yml)\n[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://opensource.org/licenses/EUPL-1.2)\n[![GitHub release](https://img.shields.io/github/v/release/RijksICTGilde/zad-actions)](https://github.com/RijksICTGilde/zad-actions/releases)\n[![Claude Code plugin](https://img.shields.io/badge/Claude_Code-plugin-blueviolet.svg)](https://github.com/MinBZK/overheid-claude-plugins)\n\nReusable GitHub Actions for deploying to [ZAD](https://github.com/RijksICTGilde/RIG-Cluster) (Zelfservice voor Applicatie Deployment).\n\n## Available Actions\n\n| Action | Description |\n|--------|-------------|\n| [deploy](./deploy) | Deploy a container image to ZAD |\n| [cleanup](./cleanup) | Remove a ZAD deployment and optionally clean up GitHub resources |\n| [scheduled-cleanup](./scheduled-cleanup) | Periodically find and clean up stale PR environments |\n\n## Quick Start\n\n### Deploy\n\n```yaml\n- name: Deploy to ZAD\n  uses: RijksICTGilde/zad-actions/deploy@v4\n  with:\n    api-key: ${{ secrets.ZAD_API_KEY }}\n    project-id: my-project\n    deployment-name: my-deployment\n    component: web\n    image: ghcr.io/org/app:latest\n```\n\n### Deploy (Multi-Component)\n\n```yaml\n- name: Deploy to ZAD\n  uses: RijksICTGilde/zad-actions/deploy@v4\n  with:\n    api-key: ${{ secrets.ZAD_API_KEY }}\n    project-id: my-project\n    deployment-name: my-deployment\n    components: |\n      [\n        {\"name\": \"web\", \"image\": \"ghcr.io/org/web:latest\"},\n        {\"name\": \"api\", \"image\": \"ghcr.io/org/api:latest\"}\n      ]\n```\n\n### Cleanup\n\n```yaml\n- name: Cleanup ZAD deployment\n  uses: RijksICTGilde/zad-actions/cleanup@v4\n  with:\n    api-key: ${{ secrets.ZAD_API_KEY }}\n    project-id: my-project\n    deployment-name: my-deployment\n    delete-github-env: true\n    delete-github-deployments: true\n    delete-container: true\n    container-org: my-org\n    container-name: my-app\n    container-tag: pr-123\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    github-admin-token: ${{ secrets.GITHUB_ADMIN_TOKEN }}\n```\n\n### Cleanup (Multi-Container)\n\n```yaml\n- name: Cleanup ZAD deployment\n  uses: RijksICTGilde/zad-actions/cleanup@v4\n  with:\n    api-key: ${{ secrets.ZAD_API_KEY }}\n    project-id: my-project\n    deployment-name: my-deployment\n    delete-container: true\n    containers: |\n      [\n        {\"org\": \"my-org\", \"name\": \"frontend\", \"tag\": \"pr-123\"},\n        {\"org\": \"my-org\", \"name\": \"api\", \"tag\": \"pr-123\"}\n      ]\n```\n\n### Scheduled Cleanup\n\n```yaml\nname: Cleanup Stale Environments\non:\n  schedule:\n    - cron: '0 2 * * 1'\nconcurrency:\n  group: scheduled-cleanup\n  cancel-in-progress: false\njobs:\n  cleanup:\n    runs-on: ubuntu-latest\n    permissions:\n      deployments: write\n      packages: write\n      pull-requests: read\n    steps:\n      - uses: RijksICTGilde/zad-actions/scheduled-cleanup@v4\n        with:\n          api-key: ${{ secrets.ZAD_API_KEY }}\n          project-id: my-project\n          github-admin-token: ${{ secrets.GITHUB_ADMIN_TOKEN }}\n```\n\n## Authentication\n\n### ZAD API Key\n\nCreate a ZAD API key via the Operations Manager and store it as `ZAD_API_KEY` in your repository secrets.\n\n### GitHub Tokens\n\nFor cleanup operations, different tokens are needed depending on what you want to clean up:\n\n| Operation | Required Token | Permissions |\n|-----------|---------------|-------------|\n| Delete GitHub deployments | `github-token` | `deployments: write` |\n| Delete GitHub environment | `github-admin-token` | Repository admin access |\n| Delete container image | `github-token` | `packages: delete` |\n\nThe `github-admin-token` requires a personal access token (PAT) or GitHub App token with admin permissions on the repository. The default `GITHUB_TOKEN` does not have sufficient permissions to delete environments.\n\n## Complete Workflow Example\n\nHere's a complete example of a PR preview deployment workflow:\n\n```yaml\nname: Deploy\n\non:\n  pull_request:\n    types: [opened, synchronize, reopened, closed]\n  push:\n    branches: [main]\n\nenv:\n  REGISTRY: ghcr.io\n  IMAGE_NAME: ${{ github.repository }}\n\njobs:\n  build:\n    if: github.event.action != 'closed'\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      packages: write\n    outputs:\n      image-tag: ${{ steps.meta.outputs.tags }}\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Log in to GHCR\n        uses: docker/login-action@v3\n        with:\n          registry: ${{ env.REGISTRY }}\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Build and push\n        uses: docker/build-push-action@v6\n        with:\n          context: .\n          push: true\n          tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ github.event.number }}\n\n  deploy-preview:\n    if: github.event_name == 'pull_request' \u0026\u0026 github.event.action != 'closed'\n    runs-on: ubuntu-latest\n    needs: build\n    environment:\n      name: pr${{ github.event.pull_request.number }}\n      url: ${{ steps.deploy.outputs.url }}\n    steps:\n      - name: Deploy to ZAD\n        id: deploy\n        uses: RijksICTGilde/zad-actions/deploy@v4\n        with:\n          api-key: ${{ secrets.ZAD_API_KEY }}\n          project-id: my-project\n          deployment-name: pr${{ github.event.pull_request.number }}\n          component: web\n          image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ github.event.number }}\n          clone-from: production\n\n  cleanup-preview:\n    if: github.event_name == 'pull_request' \u0026\u0026 github.event.action == 'closed'\n    runs-on: ubuntu-latest\n    permissions:\n      deployments: write\n      packages: write\n    steps:\n      - name: Cleanup\n        uses: RijksICTGilde/zad-actions/cleanup@v4\n        with:\n          api-key: ${{ secrets.ZAD_API_KEY }}\n          project-id: my-project\n          deployment-name: pr${{ github.event.pull_request.number }}\n          delete-github-env: true\n          delete-github-deployments: true\n          delete-container: true\n          container-org: ${{ github.repository_owner }}\n          container-name: ${{ github.event.repository.name }}\n          container-tag: pr-${{ github.event.number }}\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          github-admin-token: ${{ secrets.GITHUB_ADMIN_TOKEN }}\n\n  deploy-production:\n    if: github.event_name == 'push' \u0026\u0026 github.ref == 'refs/heads/main'\n    runs-on: ubuntu-latest\n    needs: build\n    environment:\n      name: production\n      url: ${{ steps.deploy.outputs.url }}\n    steps:\n      - name: Deploy to ZAD\n        id: deploy\n        uses: RijksICTGilde/zad-actions/deploy@v4\n        with:\n          api-key: ${{ secrets.ZAD_API_KEY }}\n          project-id: my-project\n          deployment-name: production\n          component: web\n          image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest\n```\n\n## ZAD Operations Manager API\n\nThese actions use [zad-cli](https://github.com/RijksICTGilde/zad-cli) to interact with the ZAD Operations Manager API. The CLI handles retries, task polling, and error reporting.\n\n- **API Docs**: `https://operations-manager.rig.prd1.gn2.quattro.rijksapps.nl/docs`\n\n### URL Pattern\n\nDeployed applications are accessible at:\n```\nhttps://{component}-{deployment}-{project}.rig.prd1.gn2.quattro.rijksapps.nl\n```\n\n## Claude Code Plugin\n\nThis repository is also available as a [Claude Code](https://docs.anthropic.com/en/docs/claude-code) plugin via the [overheid-plugins marketplace](https://github.com/MinBZK/overheid-claude-plugins). It provides 3 skills to assist with development:\n\n| Skill | Description |\n|-------|-------------|\n| `/zad-actions:lint` | Run pre-commit linting |\n| `/zad-actions:release` | Create a new release with changelog extraction |\n| `/zad-actions:validate-action` | Validate action.yml files for correctness |\n\n### Install\n\n```bash\nclaude plugin marketplace add MinBZK/overheid-claude-plugins\nclaude plugin install zad-actions@overheid-plugins\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or pull request.\n\n## License\n\nEUPL-1.2 - see [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frijksictgilde%2Fzad-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frijksictgilde%2Fzad-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frijksictgilde%2Fzad-actions/lists"}