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

Replace custom tag logic with docker/metadata-action #360

Closed
felddy opened this issue May 28, 2022 · 3 comments
Closed

Replace custom tag logic with docker/metadata-action #360

felddy opened this issue May 28, 2022 · 3 comments

Comments

@felddy
Copy link
Owner

felddy commented May 28, 2022

🚀 Feature Proposal

See:

Motivation

There is an action that looks like it can cleanly handle a lot of the custom logic in our build workflow.
There might be a bit of tweaking to deal with :latest in the way we treat it.

Example

See:

Pitch

Because less is more.

@felddy felddy self-assigned this May 28, 2022
@felddy
Copy link
Owner Author

felddy commented Jun 2, 2022

Current issue in testing.

:latest and :release tags are not being enabled when a semver release is created from the default branch. Note that the other semver tags were emitted.

tags: |
type=edge
type=raw,event=workflow_dispatch,value=${{ github.event.inputs.dispatch-tag}}
type=ref,event=branch
type=ref,event=pr
type=schedule,pattern=nightly
type=semver,pattern=latest,enable={{is_default_branch}}
type=semver,pattern=release,enable={{is_default_branch}}
type=semver,pattern=prerelease,enable=${{ github.ref == format('refs/heads/{0}', 'prerelease') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha

https://github.com/felddy/ci-testing/runs/6711605353?check_suite_focus=true#step:6:71

2022-06-02T15:47:51.5546431Z felddy/ci-testing:1.2.3
2022-06-02T15:47:51.5546702Z felddy/ci-testing:1.2
2022-06-02T15:47:51.5546964Z felddy/ci-testing:1
2022-06-02T15:47:51.5547246Z felddy/ci-testing:sha-3d0b305
2022-06-02T15:47:51.5547547Z ghcr.io/felddy/ci-testing:1.2.3
2022-06-02T15:47:51.5548084Z ghcr.io/felddy/ci-testing:1.2
2022-06-02T15:47:51.5548365Z ghcr.io/felddy/ci-testing:1
2022-06-02T15:47:51.5548678Z ghcr.io/felddy/ci-testing:sha-3d0b305

@felddy
Copy link
Owner Author

felddy commented Jun 2, 2022

It looks like github.ref is refs/tags/v1.2.3, which explains why the {{is_default_branch}} is failing.

See:

Probably should try {{base_ref}}

@felddy
Copy link
Owner Author

felddy commented Jul 15, 2022

This feature was added during the refactor of workflows:
See:

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

No branches or pull requests

1 participant