{"id":24512425,"url":"https://github.com/manics/action-get-quayio-tags","last_synced_at":"2025-03-15T10:11:06.881Z","repository":{"id":263915822,"uuid":"891780727","full_name":"manics/action-get-quayio-tags","owner":"manics","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-28T16:28:27.000Z","size":670,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T20:18:48.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/manics.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":"2024-11-21T00:06:15.000Z","updated_at":"2025-02-28T16:24:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"e3120acf-9b92-4320-9eda-031d3baab8ac","html_url":"https://github.com/manics/action-get-quayio-tags","commit_stats":null,"previous_names":["manics/action-get-quayio-tags"],"tags_count":0,"template":false,"template_full_name":"actions/javascript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manics%2Faction-get-quayio-tags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manics%2Faction-get-quayio-tags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manics%2Faction-get-quayio-tags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manics%2Faction-get-quayio-tags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manics","download_url":"https://codeload.github.com/manics/action-get-quayio-tags/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713415,"owners_count":20335567,"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":[],"created_at":"2025-01-22T00:46:44.795Z","updated_at":"2025-03-15T10:11:06.877Z","avatar_url":"https://github.com/manics.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# action-get-quayio-tags\n\n[![GitHub Super-Linter](https://github.com/manics/action-get-quayio-tags/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![CI](https://github.com/manics/action-get-quayio-tags/actions/workflows/ci.yml/badge.svg)\n\nA GitHub Action to fetch quay.io container image tags, and to generate build\nnumbers.\n\n## When to use this\n\nUse this when you want to tag a container image with the version of the\napplication contained within, but want the ability to rebuild the image without\nhaving to make a new release of the application.\n\nFor example, if the most recent release in `quay.io/jupyterhub/jupyterhub` is\ntagged `5.2.1-0` and the image is being rebuilt with the same JupyterHub version\n`5.2.1` this action would return `1` as the next `buildNumber`, i.e. the image\nshould be tagged `5.2.1-1`. The next rebuild would set `buildNumber` to `2`.\n\nIf a new release `5.2.2` was made the `buildNumber` would be `0`, i.e. tag\n`5.2.2-0`.\n\n## Automatically create latest and SemVer tags\n\nPass the outputs of this action to\n[action-major-minor-tag-calculator v3.3.0 or later](https://github.com/jupyterhub/action-major-minor-tag-calculator):\n\n\u003e [!WARNING]\n\u003e\n\u003e The default configuration assumes the current branch is always building the\n\u003e most recent version of the application (i.e. it should be tagged `latest`,\n\u003e `MAJOR`, `MAJOR.MINOR`, `MAJOR.MINOR.PATCH`). This is to reduce the number of\n\u003e `quay.io` API calls to fetch the relevant tags.\n\u003e\n\u003e If you are building an older release such as `4.0.0` you must set\n\u003e `allTags: \"true\"` to fetch _all_ tags so that\n\u003e `action-major-minor-tag-calculator` can work out whether to set the major,\n\u003e minor and patch aliases.\n\n## Example\n\n```yaml\nenv:\n  IMAGE: jupyterhub/jupyterhub\n  REGISTRY: quay.io\n  LATEST_BRANCH: main\n  APP_VERSION: 5.0.0\n\nsteps:\n  - name: Checkout\n    id: checkout\n    uses: actions/checkout@v4\n\n  - name: Get build-number by looking at existing tags\n    id: quayio\n    uses: manics/action-get-quayio-tags@main\n    with:\n      repository: ${{ env.IMAGE }}\n      version: ${{ env.APP_VERSION }}\n      # If this is not LATEST_BRANCH, nor is it a pull request against\n      # LATEST_BRANCH assume it's a backport branch which means we need to get\n      # all tags to work out which MAJOR and MAJOR.MINOR aliases are needed.\n      allTags:\n        ${{ (github.ref != format('refs/heads/{0}', env.LATEST_BRANCH)) \u0026\u0026\n        (github.base_ref != format('refs/heads/{0}', env.LATEST_BRANCH)) }}\n      strict: 'true'\n\n  - name: Setup push rights to registry\n    run: \u003e-\n      docker login -u \"${{ secrets.QUAY_USERNAME }}\"\n        -p \"${{ secrets.QUAY_PASSWORD }}\" \"${{ env.REGISTRY }}\"\n\n  - name: Calculate tags\n    id: imagetags\n    uses: jupyterhub/action-major-minor-tag-calculator@v3\n    with:\n      tagList: ${{ steps.quayio.outputs.tags }}\n      currentTag: ${{ env.APP_VERSION }}-${{ steps.quayio.outputs.buildNumber }}\n      prefix: \u003e-\n        ${{ env.REGISTRY }}${{ env.IMAGE }}:\n\n  - name: Print tags\n    run: |\n      echo \"Image tags: ${{ steps.imagetags.outputs.tags }}\"\n\n  - name: Build and push\n    uses: docker/build-push-action@v6\n    with:\n      push: true\n      # tags parameter must be a string input so convert `gettags` JSON\n      # array into a comma separated list of tags\n      tags: ${{ join(fromJson(steps.jupyterhubtags.outputs.tags)) }}\n```\n\n## Development\n\n[Node.js](https://nodejs.org) 20 or later is required.\n\n1. :hammer_and_wrench: Install the dependencies\n\n   ```bash\n   npm install\n   ```\n\n1. :building_construction: Package the JavaScript for distribution\n\n   ```bash\n   npm run bundle\n   ```\n\n1. :white_check_mark: Run the tests\n\n   ```bash\n   npm test\n   ```\n\n1. You can also run all steps with one command\n\n   ```bash\n   npm run all\n   ```\n\n\u003e [!NOTE]\n\u003e\n\u003e The `bundle` step is important! It will run\n\u003e [`ncc`](https://github.com/vercel/ncc) to build the final JavaScript action\n\u003e code with all dependencies included.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanics%2Faction-get-quayio-tags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanics%2Faction-get-quayio-tags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanics%2Faction-get-quayio-tags/lists"}