Comments (8)
The issue seems to be that;
- for
pull_request
you get aGITHUB_REF=refs/pull/4/merge
- for
pull_request_target
you get aGITHUB_REF=refs/heads/upstream-main
from metadata-action.
@mithro Filtering on pull_request_target
event name and using the event.number
lgtm in this case.
from metadata-action.
I have a hack at mithro@15f1e09
from metadata-action.
Looks like the hack works;
Context info
eventName: pull_request_target
sha: d72e4c711d46aca30ac89aed82631c1ae15dd307
ref: refs/pull/6/merge
workflow: Build Docker Image for Run DRC for cell GDS (using Magic) Action
action: mithrometadata-action
actor: mithro
runNumber: 52
runId: 867669317
from metadata-action.
@mithro You can try with docker/metadata-action@master
.
from metadata-action.
@crazy-max -- I'm still getting a tag for the base branch (IE localhost:5000/run-drc-for-cell-gds-using-magic:main
) - Have I configured things wrong or is pull_request_target
getting misunderstood as being a branch/tag event as well as a pull request event? Output below;
with:
images: localhost:5000/run-drc-for-cell-gds-using-magic,gcr.io/skywater-pdk/actions/run-drc-for-cell-gds-using-magic
tags: type=ref,event=tag
type=ref,event=pr
type=ref,event=branch
type=sha
type=sha,format=long
github-token: ***
env:
ACTION_NAME: run-drc-for-cell-gds-using-magic
Context info
eventName: pull_request_target
sha: 1791415f66d16e92bdc523c59e68383db3b32d74
ref: refs/heads/main
workflow: Build Docker Image for Run DRC for cell GDS (using Magic) Action
action: dockermetadata-action
actor: mithro
runNumber: 22
runId: 875362048
Processing tags input
Processing flavor input
Docker image version
pr-21
Docker tags
localhost:5000/run-drc-for-cell-gds-using-magic:pr-21
localhost:5000/run-drc-for-cell-gds-using-magic:main
localhost:5000/run-drc-for-cell-gds-using-magic:sha-1791415
localhost:5000/run-drc-for-cell-gds-using-magic:sha-1791415f66d16e92bdc523c59e68383db3b32d74
gcr.io/skywater-pdk/actions/run-drc-for-cell-gds-using-magic:pr-21
gcr.io/skywater-pdk/actions/run-drc-for-cell-gds-using-magic:main
gcr.io/skywater-pdk/actions/run-drc-for-cell-gds-using-magic:sha-1791415
gcr.io/skywater-pdk/actions/run-drc-for-cell-gds-using-magic:sha-1791415f66d16e92bdc523c59e68383db3b32d74
from metadata-action.
Have I configured things wrong or is
pull_request_target
getting misunderstood as being a branch/tag event as well as a pull request event?
Yes it's a bug indeed. It seems that the context must be modified to avoid any overflow with the branch events. In the meantime you can do this:
tags: |
type=ref,event=tag
type=ref,event=pr
type=ref,event=branch,enable=${{ github.event_name != 'pull_request_target' }}
type=sha
type=sha,format=long
Can you open a new issue about that please?
from metadata-action.
@crazy-max - #96 created.
from metadata-action.
Related Issues (20)
- Unable to verify the first certificate HOT 4
- latest tag README instructions cause errors HOT 4
- Unexpected tag is created for type=match HOT 1
- `latest` tag in auto-mode is applied to older major versions HOT 2
- Feature request and discussion: support of annotations HOT 4
- Metadata action does not properly distinguish bake matrix targets HOT 1
- IP address is not permitted to access this resource HOT 3
- Disable `main` tag when `latest` is enabled HOT 2
- Secrets exposed in some action output HOT 1
- org.opencontainers.image.source is missing from the annotations section of the manifests HOT 2
- Custom annotations HOT 1
- Action fails: Cannot find detached HEAD ref in "grafted, HEAD, tag: x.x.x" HOT 10
- Warning: No Docker image version has been generated. Check tags input. HOT 1
- Missing latest tag on type=match HOT 1
- Images cannot be empty as documentation suggests HOT 1
- v5.5.0 Broke docker/bake-action with docker-metadata-action HOT 4
- #370 breaks GitHub Actions build example HOT 3
- semver tag : allow outputing build information (part after plus) HOT 4
- Generating tags for multiple bake targets HOT 3
- `SOURCE_DATE_EPOCH` is not respected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metadata-action.