diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index a7ba628..4d97176 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -20,20 +20,32 @@ jobs: uses: docker/setup-buildx-action@v2 with: platforms: linux/amd64,linux/arm64 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + xserrat/facebook-demucs + tags: | + # set branch as tag name + type=ref,event=push,value={{branch}} + # set latest tag for default branch + type=raw,value=latest,enable={{is_default_branch}} - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Replace char '#' to '_' from GITHUB_REF_NAME env variable - id: github_ref_name_replacement_step - uses: frabert/replace-string-action@v2.0 - with: - pattern: '#' - string: ${{ github.ref_name }} - replace-with: '_' +# - +# name: Replace char '#' to '_' from GITHUB_REF_NAME env variable +# id: github_ref_name_replacement_step +# uses: frabert/replace-string-action@v2.0 +# with: +# pattern: '#' +# string: ${{ github.ref_name }} +# replace-with: '_' - name: Build and push uses: docker/build-push-action@v3 @@ -41,4 +53,5 @@ jobs: context: . push: true platforms: linux/amd64,linux/arm64 - tags: xserrat/facebook-demucs:${{ steps.github_ref_name_replacement_step.outputs.replaced }} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} +# tags: xserrat/facebook-demucs:${{ steps.github_ref_name_replacement_step.outputs.replaced }} \ No newline at end of file