uclahs-cds / tool-Docker-action

An Action to automatically build and push images to the GitHub Container registry. Includes automatic building of images for development.
GNU General Public License v2.0
0 stars 0 forks source link

Add non-semver-tags input argument #18

Closed nwiltsie closed 3 months ago

nwiltsie commented 3 months ago

Description

This closes #17 by adding a non-semver-tags argument. If that argument is given any value, the docker/metadata-action gets the additional docker tag format type=match,pattern=v(.*),group=1. That tag format will ensure that any git tag of the form vX will result in a docker tag of the form X.

I tested this with my trusty docker-internal-tests repository. When I had this workflow...

    steps:
      - uses: uclahs-cds/tool-Docker-action@dev
        with:
          non-semver-tags: true

... and tagged it as v0.0.5c, the workflow ran successfully and pushed the corresponding tag.

[!NOTE] As you can see I technically used the dev branch and not nwiltsie-arg-for-non-semver, but that's just to make future testing with that repository easier. The workflow logs show that it used 87e99e2cb9d0588d91f4597b02dc1647e2722f5d.

When I removed the argument and tagged it as v0.0.5d, it failed with the error from #17.

Closes #17

Checklist