Coder Social home page Coder Social logo

Comments (8)

Minigugus avatar Minigugus commented on April 28, 2024 1

I don't really know how Docker works with Github Actions, but I think you're right, "tags" seems the way to go (allows multiple tags for the same image). Maybe something like this could help:

    - name: Publish Docker
      uses: elgohr/[email protected]
      with:
-        name: "hayd/${{ matrix.kind }}-deno:${{ steps.get_version.outputs.VERSION }}"
+        name: "hayd/${{ matrix.kind }}-deno"
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        dockerfile: ${{ matrix.kind }}.dockerfile
        cache: true
-       tag_names: true
+       tags: "latest,${{ steps.get_version.outputs.VERSION }}"
    - name: Publish Docker Legacy
      if: matrix.kind != 'amazonlinux1'
      uses: elgohr/[email protected]
      with:
-        name: "hayd/deno:${{ matrix.kind }}-${{ steps.get_version.outputs.VERSION }}"
+        name: "hayd/deno"
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        dockerfile: ${{ matrix.kind }}.dockerfile
        cache: true
-       tag_names: true
+       tags: "latest,${{ matrix.kind }},${{ matrix.kind }}-${{ steps.get_version.outputs.VERSION }}"

However, I don't know how to tag the right latest image.

from deno_docker.

Minigugus avatar Minigugus commented on April 28, 2024 1

https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel 😏

from deno_docker.

hayd avatar hayd commented on April 28, 2024

latest isn't defined? Hmm. I was hoping that supporting hayd/alpine-deno would have that "just work" (in hayd/deno latest could be any image...

I guess I am doing something wrong here:
https://github.com/hayd/deno-docker/blob/5be5b66f3b4eb365728d9c46671d79e6e80a190e/.github/workflows/publish.yml#L17-L35

Do you think any of options will fix?
https://github.com/elgohr/Publish-Docker-Github-Action#tags

from deno_docker.

hayd avatar hayd commented on April 28, 2024

Will play with this tonight and push a latest. 🤞 your diff suggestion "just works".
Thanks!

from deno_docker.

hayd avatar hayd commented on April 28, 2024

Nearly working: https://github.com/hayd/deno-docker/blob/cae47347e325bea12e317129afde8695e0750469/.github/workflows/publish.yml

I had wanted hayd/deno "latest" to be alpine, but for some reason it's used ubuntu so might need to experiment with this some more.

from deno_docker.

Minigugus avatar Minigugus commented on April 28, 2024

Maybe the tag is overritten when images are tagged, so that only the last image remains latest :
https://github.com/hayd/deno-docker/blob/cae47347e325bea12e317129afde8695e0750469/.github/workflows/publish.yml#L10
Maybe move the alpine image at the end : ['amazonlinux1', 'centos', 'debian', 'ubuntu', 'alpine'] ?

from deno_docker.

hayd avatar hayd commented on April 28, 2024

I think it's parallel and luck of the draw which wins (or maybe Ubuntu is slightly slower to build)!

I could sleep for 60seconds on alpine before building 😆 (hacky...)

from deno_docker.

hayd avatar hayd commented on April 28, 2024

I'm confident I have a solution that will work: using alpine as a separate build step. It seems like Publish-Docker-Github-Action is unhappy with two steps to the same repo in the same block (it never pushed the 0.37.0 tag to dockerhub that should have been just from alpine).


Related, it's unclear if I should be doing any of these things:
dockerimages@364f74b

(this fork/rename is a little weird.)

from deno_docker.

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.