{"id":20915108,"url":"https://github.com/microcks/import-github-action","last_synced_at":"2025-10-24T06:03:25.097Z","repository":{"id":65160889,"uuid":"380959530","full_name":"microcks/import-github-action","owner":"microcks","description":"GitHub Action for importing API specs in Microcks","archived":false,"fork":false,"pushed_at":"2024-10-18T12:30:39.000Z","size":451,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-30T05:42:57.077Z","etag":null,"topics":["api","contract-testing","github-actions","microcks","mocking","testing"],"latest_commit_sha":null,"homepage":"https://microcks.io","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microcks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY-INSIGHTS.yml","support":null,"governance":"GOVERNANCE.md","roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"microcks","patreon":null,"open_collective":"microcks","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-06-28T08:25:40.000Z","updated_at":"2024-10-18T12:30:40.000Z","dependencies_parsed_at":"2024-11-07T22:23:53.167Z","dependency_job_id":"74974089-9997-4bb5-be85-1dc738d937b5","html_url":"https://github.com/microcks/import-github-action","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.5,"last_synced_commit":"6c526e4204914079ea3b83b0d9efa4c0bc82fca8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fimport-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fimport-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fimport-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fimport-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microcks","download_url":"https://codeload.github.com/microcks/import-github-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224758093,"owners_count":17364953,"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":["api","contract-testing","github-actions","microcks","mocking","testing"],"created_at":"2024-11-18T16:13:02.505Z","updated_at":"2025-10-24T06:03:20.067Z","avatar_url":"https://github.com/microcks.png","language":null,"readme":"## GitHub Action for importing API spec in Microcks\n\nThis is a GitHub Action you may use in your Workflow to import into Microcks some API specification files. This allow keeping your API definitions, mocks and tests up-to-date into Microcks.. This action is basically a wrapper around the [Microcks CLI](https://github.com/microcks/microcks-cli) and provides the same configuration capabilities.\n\n[![License](https://img.shields.io/github/license/microcks/microcks-cli?style=for-the-badge\u0026logo=apache)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Project Chat](https://img.shields.io/badge/discord-microcks-pink.svg?color=7289da\u0026style=for-the-badge\u0026logo=discord)](https://microcks.io/discord-invite/)\n[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/microcks-cli-image\u0026style=for-the-badge)](https://artifacthub.io/packages/search?repo=microcks-cli-image)\n[![CNCF Landscape](https://img.shields.io/badge/CNCF%20Landscape-5699C6?style=for-the-badge\u0026logo=cncf)](https://landscape.cncf.io/?item=app-definition-and-development--application-definition-image-build--microcks)\n\n### Build Status\n\n#### Fossa license and security scans\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Fimport-github-action.svg?type=shield\u0026issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fimport-github-action?ref=badge_shield\u0026issueType=license)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Fimport-github-action.svg?type=shield\u0026issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fimport-github-action?ref=badge_shield\u0026issueType=security)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Fimport-github-action.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fimport-github-action?ref=badge_small)\n\n#### OpenSSF best practices on Microcks core\n\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/7513/badge)](https://bestpractices.coreinfrastructure.org/projects/7513)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microcks/microcks/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microcks/microcks)\n\n## Community\n\n* [Documentation](https://microcks.io/documentation/tutorials/getting-started/)\n* [Microcks Community](https://github.com/microcks/community) and community meeting\n* Join us on [Discord](https://microcks.io/discord-invite/), on [GitHub Discussions](https://github.com/orgs/microcks/discussions) or [CNCF Slack #microcks channel](https://cloud-native.slack.com/archives/C05BYHW1TNJ)\n\nTo get involved with our community, please make sure you are familiar with the project's [Code of Conduct](./CODE_OF_CONDUCT.md).\n\n## What is needs?\n\nThe `import` action need 1 argument:\n\n* `\u003cspecificationFile1[:primary],specificationFile2[:primary]\u003e` : Comma separated list of API specs to import with flag telling if it's a primary artifact. Example: `'specs/my-openapi.yaml:true,specs/my-postmancollection.json:false'`\n\nWith a bunch of mandatory flags:\n\n* `--microcksURL` for the Microcks API endpoint,\n* `--keycloakClientId` for the Keycloak Realm Service Account ClientId,\n* `--keycloakClientSecret` for the Keycloak Realm Service Account ClientSecret.\n\n## How to use it?\n\nObviously we can find this action with [GitHub Actions Marketplace](https://github.com/marketplace?type=actions) :wink:\n\nYou may add the Action to your Workflow directly from the GitHub UI.\n\n![marketplace](./assets/marketplace.png)\n\n### Step 1 - Configure the GitHub action\n\n```yaml\nname: my-workflow\non: [push]\njobs:\n  my-job:\n    runs-on: ubuntu-latest\n    environment: Development\n    steps:\n      - uses: microcks/import-github-action@v1\n        with:\n          specificationFiles: 'samples/weather-forecast-openapi.yml:true,samples/weather-forecast-postman.json:false'\n          microcksURL: 'https://microcks.apps.acme.com/api/'\n          keycloakClientId:  ${{ secrets.MICROCKS_SERVICE_ACCOUNT }}\n          keycloakClientSecret:  ${{ secrets.MICROCKS_SERVICE_ACCOUNT_CREDENTIALS }}\n```\n\n### Step 2 - Configure the Secrets\n\nAs you probably saw just above, we do think it's a best practice to use GitHub Secrets (general or tied to `Environment` like in the example) to hold the Keycloak credentials (client Id and Secret). See below the Secrets configuration we've used for the example:\n\n![secret configuration](./assets/secrets.png)","funding_links":["https://github.com/sponsors/microcks","https://opencollective.com/microcks"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocks%2Fimport-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrocks%2Fimport-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocks%2Fimport-github-action/lists"}