GithubHelp home page GithubHelp logo

Comments (4)

 avatar commented on August 10, 2024

I'm having the same issue. Also, in addition to that, I have no idea how I can get this workflow to use the latest git tag to tag since I want my images to be tagged with latest and v.A.B.C (where A, B and C are respective numbers).

from metadata-action.

crazy-max avatar crazy-max commented on August 10, 2024

@gbaeke

Only have a user/repo:tag-sha in the outputs.tags

If you only want the commit id as a tag then the tags output might not be necessary. Instead you can just use:

tags: name/app:${{ github.sha }}

Like this:

name: ci

on:
  push:
    branches:
      - '**'
    tags:
      - 'v*.*.*'
  pull_request:

jobs:
  docker:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Docker meta
        id: docker_meta
        uses: crazy-max/ghaction-docker-meta@v1
        with:
          images: name/app
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      -
        name: Login to DockerHub
        if: github.event_name != 'pull_request'
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ./Dockerfile
          platforms: linux/amd64,linux/arm64,linux/386
          push: ${{ github.event_name != 'pull_request' }}
          tags: name/app:${{ github.sha }}
          labels: ${{ steps.docker_meta.outputs.labels }}

from metadata-action.

 avatar commented on August 10, 2024

This made me search and find a workflow that fixes my issue (Get Latest Tag by GitHub directly)

from metadata-action.

crazy-max avatar crazy-max commented on August 10, 2024

@NatsumiHB Yes that's it: https://github.com/crazy-max/ghaction-docker-meta#latest-tag

from metadata-action.

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.