Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the images input to be empty, which outputs just the raw tags #307

Closed
wants to merge 4 commits into from

Conversation

jasondamour
Copy link
Contributor

Addresses #212

Signed-off-by: Jason D'Amour <jasondamour98@gmail.com>
Signed-off-by: Jason D'Amour <jasondamour98@gmail.com>
Signed-off-by: Jason D'Amour <jasondamour98@gmail.com>
@jasondamour
Copy link
Contributor Author

@crazy-max Can I get eyes on this before I resolve conflicts?

@jasondamour
Copy link
Contributor Author

Intended usage is for build tools which only take the tags as input, not the full image url. For example, this is working today:

    - name: Docker Metadata
      id: docker-metadata
      uses: jasondamour/metadata-action@4a2a7878d3f53d548dc904024c8873d1fdb152be
      with:
        sep-tags: ','
        sep-labels: ','
        tags: ${{ env.DOCKER_TAGS_CONFIG }}
    - name: Maven Build
      run: >
        mvn jib:build
        -Djib.to.tags=${{ steps.platfom-svc-docker-metadata.outputs.tags }}
        -Djib.container.labels=${{ steps.platfom-svc-docker-metadata.outputs.labels }}

@tatality173
Copy link

jasondamour:empty-images

@tatality173
Copy link

// docker-bake.hcl
target "docker-metadata-action" {}

target "build" {
inherits = ["docker-metadata-action"]
context = "./"
dockerfile = "Dockerfile"
platforms = [
"linux/amd64",
"linux/arm/v6",
"linux/arm/v7",
"linux/arm64",
"linux/386"
]
}

@jasondamour
Copy link
Contributor Author

@tatality173 ??? What are you trying to say?

@jasondamour
Copy link
Contributor Author

@crazy-max thoughts?

@irux
Copy link

irux commented Oct 9, 2023

any updates on this ?

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very sorry for the delay!

Changes LGTM but I think we need extra tests as well for this new use case. Can you rebase?

@jasondamour
Copy link
Contributor Author

Updated from master. @crazy-max I don't really understand the testing framework, can you give some pointers

@crazy-max
Copy link
Member

crazy-max commented Oct 11, 2023

Updated from master.

Can you do a proper rebase instead of merge commit please?

I don't really understand the testing framework, can you give some pointers

In https://github.com/docker/metadata-action/blob/master/__tests__/meta.test.ts to test the case when no image is set. One in this suite

describe('push', () => {
would be fine.

@irux
Copy link

irux commented Nov 20, 2023

any news on this ? @crazy-max @jasondamour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants