Comments (10)
I think at least this should be a documented for deploying ECR or the Github registry
Thank you for your swift response!
from publish-docker-github-action.
I just updated the ECR action to use action.yml
(as Dockerfile labels don't work since yesterday).
Could you please retry and also try a hardcoded registry?
from publish-docker-github-action.
If that doesn't help, it would be great, if you could provide feedback on what happens, if you use the Docker from https://github.com/elgohr/ecr-login-action locally.
Sadly I can't help directly, as I'm not using ECR.
from publish-docker-github-action.
I see the issues, the DOCKERNAME
isn't prefixing the registry
https://github.com/elgohr/Publish-Docker-Github-Action/blob/master/entrypoint.sh#L12
So here when you push it doesn't have a reference to the custom registry
https://github.com/elgohr/Publish-Docker-Github-Action/blob/master/entrypoint.sh#L123
I think either need to add the registry to DOCKERNAME
if registry is defined or add it to the push funtion
from publish-docker-github-action.
Ok, so you were able to fix it by providing name with the registry?
I'm not sure about adding it in the action automatically, but I'll think about that. Sadly this would be a breaking change...
from publish-docker-github-action.
Thank you for the feedback.
I think I'll add the registry, if the name doesn't contain it. In this way it wouldn't be breaking
from publish-docker-github-action.
Experiencing the same issue and not exactly following what the fix is? (or is it better to wait on an incoming update?)
from publish-docker-github-action.
@elgohr recently publish an update, now it will work as expected when you define the registry
attribute, so for example,
- name: Publish to Registry
uses: elgohr/[email protected]
with:
name: `[BUCKET]`/`[IMAGE_NAME]`
username: ${{ steps.ecr.outputs.username }}
password: ${{ steps.ecr.outputs.password }}
registry: `[ECR_REGISTRY_ID]`.dkr.ecr.us-east-1.amazonaws.com
the abvove will compile your image and also push to [ECR_REGISTRY_ID].dkr.ecr.us-east-1.amazonaws.com/[BUCKET]
/[IMAGE_NAME]
Hope that helps
from publish-docker-github-action.
Hmm, I think I'm even more confused now. My ECR repo URI doesn't have two parts at the end:
[ECR_REGISTRY_ID].dkr.ecr.us-east-1.amazonaws.com/[BUCKET]/[IMAGE_NAME]
Unless that is supposed to be [ECR_REGISTRY_ID].dkr.ecr.us-east-1.amazonaws.com/[IMAGE_NAME]:[TAG]
??
Why is registry: ${{ steps.ecr.outputs.registry }}
no longer valid?
My entire action looks like this:
name: docker
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Login to ECR
id: ecr
uses: elgohr/ecr-login-action@master
with:
access_key: ${{ secrets.AWS_ACCESS_KEY }}
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-west-2
- name: Publish to Registry
uses: elgohr/[email protected]
with:
name: myregistry.dkr.ecr.us-west-2.amazonaws.com/myimage
username: ${{ steps.ecr.outputs.username }}
password: ${{ steps.ecr.outputs.password }}
registry: ${{ steps.ecr.outputs.registry }}
from publish-docker-github-action.
Aha, I spoke too soon. I see the difference now.
from publish-docker-github-action.
Related Issues (20)
- [BUG] tags example in README is deprecated HOT 2
- `tag_semver` does not recognize pre-releases HOT 1
- [BUG] Get https://***:6000/v2/: http: server gave HTTP response to HTTPS client
- [FEATURE] `no_push: true` should not complain about missing credentials HOT 5
- [BUG] Not logged in to https://index.docker.io/v1/ HOT 1
- Action Required: Fix Renovate Configuration HOT 1
- [BUG] Migrating from GitHub Packages Docker registry to GitHub Container Registry HOT 2
- "ca-certificates-20191127-r2: bad archive" error HOT 1
- [FEATURE]
- [FEATURE] Do not overwrite existing images HOT 4
- [BUG] docker:20.10.8 seem to break the test.bats HOT 15
- [BUG] Docker build failed with exit code 1 HOT 1
- [BUG] Example for using tags seems to be broken HOT 2
- Question: Action does not get the tag-information HOT 2
- [BUG] HOT 5
- [BUG] `sed` error when switching to v4 actions and built against tag HOT 8
- tag_semver is ignored for v4 HOT 6
- [BUG] ::set-output deprecated in actions HOT 7
- [BUG] Old tag confuses automated dependency updaters HOT 4
- [BUG] docker:not found 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 publish-docker-github-action.