{"id":16725234,"url":"https://github.com/unfor19/configmap-action","last_synced_at":"2026-04-11T08:02:56.212Z","repository":{"id":122056852,"uuid":"455525692","full_name":"unfor19/configmap-action","owner":"unfor19","description":"Exports configmap.json as a job-output according to a given key, such as `GIT_BRANCH` or `DEPLOYMENT_ENVIRONMENT`, which is later consumed by other jobs with \"needs\".","archived":false,"fork":false,"pushed_at":"2022-11-06T11:29:02.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2026-03-12T12:03:03.507Z","etag":null,"topics":["actions","configmap","configuration","deployment","github","matrix"],"latest_commit_sha":null,"homepage":"https://meirg.co.il","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unfor19.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-04T11:39:43.000Z","updated_at":"2022-08-30T04:20:04.000Z","dependencies_parsed_at":"2023-06-09T05:30:33.090Z","dependency_job_id":null,"html_url":"https://github.com/unfor19/configmap-action","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/unfor19/configmap-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fconfigmap-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fconfigmap-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fconfigmap-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fconfigmap-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unfor19","download_url":"https://codeload.github.com/unfor19/configmap-action/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fconfigmap-action/sbom","scorecard":{"id":909566,"data":{"date":"2025-08-11","repo":{"name":"github.com/unfor19/configmap-action","commit":"fd44e9eec13a4598138424b12c3b347820b71dc6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/testing.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/unfor19/configmap-action/testing.yml/development?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/testing.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/unfor19/configmap-action/testing.yml/development?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'development'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T18:37:24.801Z","repository_id":122056852,"created_at":"2025-08-24T18:37:24.801Z","updated_at":"2025-08-24T18:37:24.801Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31673068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["actions","configmap","configuration","deployment","github","matrix"],"created_at":"2024-10-12T22:48:24.076Z","updated_at":"2026-04-11T08:02:56.195Z","avatar_url":"https://github.com/unfor19.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# configmap-action\n\n[![testing](https://github.com/unfor19/configmap-action/workflows/testing/badge.svg)](https://github.com/unfor19/configmap-action/actions?query=workflow%3Atesting)\n[![test-action](https://github.com/unfor19/configmap-action-test/workflows/test-action/badge.svg)](https://github.com/unfor19/configmap-action-test/actions?query=workflow%3Atest-action)\n\nExports [configmap.json](./configmap.json) as a [job-output]([output](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs)) according to a given key, such as `GIT_BRANCH` or `DEPLOYMENT_ENVIRONMENT`, which is later consumed by other jobs with \"[needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)\".\n\nFor GitHub Enterprise customers, the same idea is implemented by [Using environments for deployment\n](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment). Bear in mind that:\n\n\u003e Environments, environment protection rules, and environment secrets are available in public repositories for all products. For access to environments in private repositories, you must use GitHub Enterprise. For more information, see \"GitHub's products.\"\n\nThis action is an alternative implemenation of GitHub Environments, for using environment specific configurations according to a given key; such as `GIT_BRANCH`, see [Usage](#Usage) section.\n\nTested in [unfor19/configmap-action-test](https://github.com/unfor19/configmap-action-test/actions?query=workflow%3Atest-action)\n\n## Requirements\n\nGitHub's Linux [ubuntu-20.04](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md) runners include the below requirements.\n\n1. [Bash v4.4+](https://www.gnu.org/software/bash/)\n2. [jq v1.6+](https://stedolan.github.io/jq/)\n\n\u003e **NOTE**: If you're using [Self-Hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners), make sure you have the above requirements installed on the runner.\n\n\u003e **TODO**: Create a new repo that builds a new version of the Docker image [summerwind/actions-runner:latest](https://github.com/actions-runner-controller/actions-runner-controller#software-installed-in-the-runner-image). That will ease the process of implementing this action when using [actions-runner-controller](https://github.com/actions-runner-controller/actions-runner-controller#software-installed-in-the-runner-image).\n\n\n## Usage\n\n1. Create a [configmap.json](./configmap.json) in your git repository\n2. Add the following job to the top of an existing workflow; I'm using [github.ref_name](https://docs.github.com/en/actions/learn-github-actions/contexts#:~:text=github.ref_name) to dynamically select the relevant configmap per environment.\n   ```yaml\n   prepare:\n     runs-on: ubuntu-20.04\n     name: Prepare ${{ github.event.inputs.src_repository }}\n     steps:\n       - uses: actions/checkout@v2\n       # Assuming `configmap.json` exists in the git repo\n       - name: Set Configmap\n         env:\n           CONFIGMAP_FILE_PATH: configmap.json\n         id: set-configmap\n         run: |\n           echo \"configmap=$(jq -c . ${{ env.CONFIGMAP_FILE_PATH }})\" \u003e\u003e $GITHUB_OUTPUT\n       - name: Export Configmap\n         uses: unfor19/configmap-action@development\n         with:\n           configmap_map: ${{ steps.set-configmap.outputs.configmap }}\n           configmap_key: ${{ github.ref_name }} # The branch or tag name that triggered the workflow run\n           configmap_default_key_name: \"default\" # The default configuration to fetch when configmap_key is not found\n           configmap_skip_env: \"false\" # By default, all outputs are exported as env var in $GITHUB_ENV Set to true if you wish to disable this behavior\n         id: export-configmap\n      ### Required outputs - feel free to add more outputs\n      ### -----------------------------------------------------\n      outputs:\n        CONFIGMAP: ${{ steps.export-configmap.outputs.CONFIGMAP_MAP }}\n        CONFIGMAP_SELECTED_KEY: ${{ steps.export-configmap.outputs.CONFIGMAP_SELECTED_KEY }}\n      ### -----------------------------------------------------\n   ```\n3. Consume `prepare`'s output `CONFIGMAP` as a [matrix](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix) in existing jobs, such as `build`\n   ```yaml\n   build:\n     runs-on: ubuntu-20.04\n     name: Build ${{ matrix.configmap.NODE_VERSION }}\n     ### Add the following block to each job\n     ### -----------------------------------------------------\n     needs:\n       - prepare\n     strategy:\n       matrix:\n         configmap: ${{ fromJSON(needs.prepare.outputs.CONFIGMAP) }}\n     ### -----------------------------------------------------\n     steps:\n       - uses: actions/checkout@v2\n       # Inject relevant variables per step\n       - name: Get env vars\n         env:\n           NODE_ENV: ${{ matrix.configmap.NODE_ENV }}\n           NODE_VERSION: ${{ matrix.configmap.NODE_VERSION }}\n         run: |\n           echo \"$NODE_ENV\"\n           echo \"$NODE_VERSION\"\n   ```\n\n### Consuming GitHub Actions Secrets\n\nSecrets **names** are exposed to all steps in a job, though values of secrets can be selectively injected to relevant steps, see example below.\n\n1. Assuming `configmap.json` contains the following secrets names\n   ```json\n   {\n     \"production\": [\n       {\n         ...\n         \"AWS_ACCESS_KEY_ID_NAME\": \"AWS_ACCESS_KEY_ID_PRODUCTION\",\n         \"AWS_SECRET_ACCESS_KEY_NAME\": \"AWS_SECRET_ACCESS_KEY_PRODUCTION\"\n       }\n     ],\n     \"development\": [\n       {\n         ...\n         \"AWS_ACCESS_KEY_ID_NAME\": \"AWS_ACCESS_KEY_ID_DEVELOPMENT\",\n         \"AWS_SECRET_ACCESS_KEY_NAME\": \"AWS_SECRET_ACCESS_KEY_DEVELOPMENT\"\n       }\n     ]\n   }\n   ```\n2. Create secrets per environment (development, staging, production, etc.) in GitHub Actions\n   - AWS_ACCESS_KEY_ID_DEVELOPMENT\n   - AWS_SECRET_ACCESS_KEY_DEVELOPMENT\n   - AWS_ACCESS_KEY_ID_PRODUCTION\n   - AWS_SECRET_ACCESS_KEY_PRODUCTION\n3. Consume secrets as environment variables with `secrets[matrix.configmap.SECRET_NAME]`.\n   ```yaml\n     deploy:\n       runs-on: ubuntu-20.04\n       name: Deploy to ${{ needs.prepare.outputs.CONFIGMAP_SELECTED_KEY }}\n       needs:\n         - prepare\n         - build\n       strategy:\n         matrix:\n           configmap: ${{ fromJSON(needs.prepare.outputs.CONFIGMAP) }}\n       env:\n         DEPLOYMENT_ENVIRONMENT: ${{ needs.prepare.outputs.CONFIGMAP_SELECTED_KEY }}\n       ### -----------------------------------------------------\n       steps:\n         - uses: actions/checkout@v2\n         # Inject relevant variables per step\n         - name: Get env vars\n           env:\n             AWS_ACCESS_KEY_ID: ${{ secrets[matrix.configmap.AWS_ACCESS_KEY_ID_NAME] }}\n             AWS_SECRET_ACCESS_KEY: ${{ secrets[matrix.configmap.AWS_SECRET_ACCESS_KEY_NAME] }}\n           run: |\n             echo \"Deploying to $DEPLOYMENT_ENVIRONMENT\"\n             echo \"AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID\"\n             echo \"AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY\"\n   ```\n\n\n## Authors\n\nCreated and maintained by [Meir Gabay](https://github.com/unfor19)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/unfor19/configmap-action/blob/master/LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfor19%2Fconfigmap-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funfor19%2Fconfigmap-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfor19%2Fconfigmap-action/lists"}