{"id":21417327,"url":"https://github.com/staffbase/gitops-github-action","last_synced_at":"2026-01-08T13:13:22.784Z","repository":{"id":37981747,"uuid":"308556659","full_name":"Staffbase/gitops-github-action","owner":"Staffbase","description":"GitHub Action for our GitOps workflow","archived":false,"fork":false,"pushed_at":"2025-07-01T08:32:31.000Z","size":3316,"stargazers_count":18,"open_issues_count":1,"forks_count":1,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-07-01T09:35:22.684Z","etag":null,"topics":["actions","github-actions","gitops"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Staffbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-30T07:32:30.000Z","updated_at":"2025-07-01T08:32:33.000Z","dependencies_parsed_at":"2024-04-02T07:47:28.613Z","dependency_job_id":"5b10597e-e6da-458f-9550-bf9430d6c51c","html_url":"https://github.com/Staffbase/gitops-github-action","commit_stats":{"total_commits":89,"total_committers":17,"mean_commits":5.235294117647059,"dds":0.752808988764045,"last_synced_commit":"93201a7bf8ac551ce691549924165c905bdc7c8b"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/Staffbase/gitops-github-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fgitops-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fgitops-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fgitops-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fgitops-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Staffbase","download_url":"https://codeload.github.com/Staffbase/gitops-github-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fgitops-github-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265240404,"owners_count":23733015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["actions","github-actions","gitops"],"created_at":"2024-11-22T19:14:37.481Z","updated_at":"2026-01-08T13:13:22.755Z","avatar_url":"https://github.com/Staffbase.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 GitHub Action for GitOps\n\nThis GitHub Action can be used for our GitOps workflow. The GitHub Action will build and push the Docker image for your service and deploys\nthe new version at your Kubernetes clusters.\n\n## Requirement\n\nWhen you want to use this GitHub Action your GitHub repository should have a `dev` and `master` / `main` branch and it should use tags for\nreleases.\n\n- For the `dev` branch we will change the files specified under `gitops-dev`.\n- For the `master` / `main` branch we will change the files specified under `gitops-stage`.\n- For a new tag the files under `gitops-prod` will be used.\n\nThis GitOps setup should be the default for all your repositories. However, if you have a special case, you can\nleave `gitops-dev`, `gitops-stage` and `gitops-prod` undefined, then those steps will be skipped.\n\n## Usages\n\n### Build, Push and Deploy Docker Image\n\n```yaml\nname: CD\n\non: [ push ]\n\njobs:\n  ci-cd:\n    name: Build, Push and Deploy\n\n    runs-on: ubuntu-22.04\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: GitOps (build, push and deploy a new Docker image)\n        uses: Staffbase/gitops-github-action@v6.0\n        with:\n          docker-username: ${{ secrets.HARBOR_USERNAME }}\n          docker-password: ${{ secrets.HARBOR_PASSWORD }}\n          docker-image: private/diablo-redbook\n          gitops-token: ${{ secrets.GITOPS_TOKEN }}\n          gitops-dev: |-\n            clusters/customization/dev/mothership/diablo-redbook/diablo-redbook-helm.yaml spec.template.spec.containers.redbook.image\n          gitops-stage: |-\n            clusters/customization/stage/mothership/diablo-redbook/diablo-redbook-helm.yaml spec.template.spec.containers.redbook.image\n          gitops-prod: |-\n            clusters/customization/prod/mothership/diablo-redbook/diablo-redbook-helm.yaml spec.template.spec.containers.redbook.image\n```\n\n### Build and Push Docker Image\n\n```yaml\nname: CD\n\non: [ push ]\n\njobs:\n  ci-cd:\n    name: Build and Push\n\n    runs-on: ubuntu-22.04\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: GitOps (build and push a new Docker image)\n        uses: Staffbase/gitops-github-action@v6.0\n        with:\n          docker-username: ${{ secrets.HARBOR_USERNAME }}\n          docker-password: ${{ secrets.HARBOR_PASSWORD }}\n          docker-image: private/diablo-redbook\n```\n\n### Deploy Docker Image\n\n```yaml\nname: CD\n\non: [ push ]\n\njobs:\n  ci-cd:\n    name: Deploy\n\n    runs-on: ubuntu-22.04\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: GitOps (deploy a new Docker image)\n        uses: Staffbase/gitops-github-action@v6.0\n        with:\n          docker-image: private/diablo-redbook\n          gitops-token: ${{ secrets.GITOPS_TOKEN }}\n          gitops-dev: |-\n            clusters/customization/dev/mothership/diablo-redbook/diablo-redbook-helm.yaml spec.template.spec.containers.redbook.image\n          gitops-stage: |-\n            clusters/customization/stage/mothership/diablo-redbook/diablo-redbook-helm.yaml spec.template.spec.containers.redbook.image\n          gitops-prod: |-\n            clusters/customization/prod/mothership/diablo-redbook/diablo-redbook-helm.yaml spec.template.spec.containers.redbook.image\n```\n\n## Inputs\n\n| Name                        | Description                                                                                                                    | Default                                              |\n|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|\n| `docker-registry`           | Docker Registry                                                                                                                | `staffbase.jfrog.io`                                 |\n| `docker-registry-api`       | Docker Registry API (used for retagging without pulling)                                                                       | `https://staffbase.jfrog.io/artifactory/api/docker/` |\n| `docker-image`              | Docker Image                                                                                                                   |                                                      |\n| `docker-custom-tag`         | Docker Custom Tag to be set on the image                                                                                       |                                                      |\n| `docker-username`           | Username for the Docker Registry                                                                                               |                                                      |\n| `docker-password`           | Password for the Docker Registry                                                                                               |                                                      |\n| `docker-file`               | Dockerfile                                                                                                                     | `./Dockerfile`                                       |\n| `docker-build-args`         | List of build-time variables                                                                                                   |                                                      |\n| `docker-build-secrets`      | List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)                                              |                                                      |\n| `docker-build-secret-files` | List of secret files to expose to the build (e.g., key=filename, MY_SECRET=./secret.txt)                                       |                                                      |\n| `docker-build-target`       | Sets the target stage to build like: \"runtime\"                                                                                 |                                                      |\n| `docker-build-provenance`   | Generate [provenance](https://docs.docker.com/build/attestations/slsa-provenance/) attestation for the build                   | `false`                                              |\n| `docker-disable-retagging`  | Disables retagging of existing images and run a new build instead                                                              | `false`                                              |\n| `gitops-organization`       | GitHub Organization for GitOps                                                                                                 | `Staffbase`                                          |\n| `gitops-repository`         | GitHub Repository for GitOps                                                                                                   | `mops`                                               |\n| `gitops-user`               | GitHub User for GitOps                                                                                                         | `Staffbot`                                           |\n| `gitops-email`              | GitHub Email for GitOps                                                                                                        | `staffbot@staffbase.com`                             |\n| `gitops-token`              | GitHub Token for GitOps                                                                                                        |                                                      |\n| `gitops-dev`                | Files which should be updated by the GitHub Action for DEV, must be relative to the root of the GitOps repository              |                                                      |\n| `gitops-stage`              | Files which should be updated by the GitHub Action for STAGE, must be relative to the root of the GitOps repository            |                                                      |\n| `gitops-prod`               | Files which should be updated by the GitHub Action for PROD, must be relative to the root of the GitOps repository             |                                                      |\n| `working-directory`         | The directory in which the GitOps action should be executed. The docker-file variable should be relative to working directory. | `.`                                                  |\n\n## Outputs\n\n| Name            | Description         |\n|-----------------|---------------------|\n| `docker-digest` | Digest of the image |\n| `docker-tag`    | Tag of the image    |\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## License\n\nThis project is licensed under the Apache-2.0 License - see the [LICENSE.md](LICENSE) file for details.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"docs/assets/images/staffbase.png\" alt=\"Staffbase GmbH\" width=\"96\" /\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cb\u003eStaffbase GmbH\u003c/b\u003e\n      \u003cbr /\u003eStaffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: \u003ca href=\"https://jobs.staffbase.com\" target=\"_blank\" rel=\"noreferrer\"\u003ejobs.staffbase.com\u003c/a\u003e\n      \u003cbr /\u003e\u003ca href=\"https://github.com/Staffbase\" target=\"_blank\" rel=\"noreferrer\"\u003eGitHub\u003c/a\u003e | \u003ca href=\"https://staffbase.com/\" target=\"_blank\" rel=\"noreferrer\"\u003eWebsite\u003c/a\u003e | \u003ca href=\"https://jobs.staffbase.com\" target=\"_blank\" rel=\"noreferrer\"\u003eJobs\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Releasing new versions\n\nGo to the release overview page and publish the draft release with a new version number. Make sure to update the floating version commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaffbase%2Fgitops-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaffbase%2Fgitops-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaffbase%2Fgitops-github-action/lists"}