diff --git a/README.md b/README.md index 799323d..22c29be 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ jobs: # Image Tagger - name: Image Tag Strategy id: tagging - uses: HackerHappyHour/tagging-strategy@v1 + uses: HackerHappyHour/tagging-strategy@v2 if: ${{ github.event_name == 'release' }} with: latest: true @@ -267,7 +267,7 @@ jobs: uses: actions/checkout@v2 - name: Produce Docker Tags id: tagging - uses: HackerHappyHour/tagging-strategy@v1 + uses: HackerHappyHour/tagging-strategy@v2 with: latest: github.event_type tags: | diff --git a/__tests__/__data__/taggingStrategy.js b/__tests__/__data__/taggingStrategy.js index 8f34496..6723421 100644 --- a/__tests__/__data__/taggingStrategy.js +++ b/__tests__/__data__/taggingStrategy.js @@ -3,5 +3,8 @@ exports.scenarios = [ ['1,1.0,1.0.0',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0'}], ['foo/bar:1,foo/bar:1.0,foo/bar:1.0.0',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', imageName: 'foo/bar'}], ['foo/bar:1,foo/bar:1.0,foo/bar:1.0.0,foo/bar:latest',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', imageName: 'foo/bar', latest: true}], - ['1,1.0,1.0.0,latest',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', latest: true}] + ['1,1.0,1.0.0,latest',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', latest: true}], + ['1-foobar,1.0-foobar,1.0.0-foobar',{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0'}], + ['1-foobar,1.0-foobar,1.0.0-foobar,latest',{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0', latest: true}], + ['hello/world:1-foobar,hello/world:1.0-foobar,hello/world:1.0.0-foobar,hello/world:latest',{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0', latest: true, imageName: 'hello/world'}], ]