Git Product home page Git Product logo

Comments (5)

mr-smithers-excellent avatar mr-smithers-excellent commented on August 19, 2024

Give this a shot and let me know if it fixes your issue.

tag: latest-${{ env.VERSION }}

from docker-build-push.

tomtom94 avatar tomtom94 commented on August 19, 2024

It doesn't work

Error: Command failed: docker build -f Dockerfile -t rg.nl-ams.scw.cloud/myfolder/myapp:latest-*** .
      - uses: mr-smithers-excellent/docker-build-push@v3
        name: Build & push Docker image
        with:
          image: myimage
          tag: latest-${{ env.VERSION }}
          registry: rg.nl-ams.scw.cloud/myapp
          dockerfile: Dockerfile
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}
        env:
          VERSION: ${{ secrets.VERSION }}

This is just because github secret appears like *** fuck.

from docker-build-push.

mr-smithers-excellent avatar mr-smithers-excellent commented on August 19, 2024

Why are you setting the VERSION variable as a secret? I'd recommend simply setting it as an environment variable. The problem you're trying to solve here isn't specific to this GitHub Action, but a general problem with how you're passing variables through your action config. I'd make sure you comb through the docs on context and expression syntax as well as environment variables.

from docker-build-push.

tomtom94 avatar tomtom94 commented on August 19, 2024

Because I don't want the user to change the version from latest-345 to latest-346 everytime
And I don't want to use your module because if you make a commit you must make a git pull for the user

I must make a version upgrade everytime for Kubernetes, otherwise this dickhead of Kubernetes charts doesn't make a pull of an image it already has downloaded once. Even if you use the Kubernetes options imagePullPolicy: Always

from docker-build-push.

tomtom94 avatar tomtom94 commented on August 19, 2024

Thanks for helping me bro, I just found the solution myself.

Just use git tag. https://github.com/marketplace/actions/git-tag-generator

I haven't ever heard about git tag but this will do the job

from docker-build-push.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.