Comments (13)
Github actions can use a URL with docker:// prefix to download built images from hub.docker.com.
Doing that would make actions run faster by bypassing building the image during the action.
from ansible-lint-action.
According to actions/runner-images#1445 (comment)
For publicly accessible containers we are working with docker hub to make sure you will not be impacted by the new rate limits. If you need private containers we still do not have a solution for that problem for forks of public repos.
So, relying on docker hub should not hit rate limiting in github actions (at least for public repos). :)
from ansible-lint-action.
No longer valid for version on main branch, where we use creator-ee container and no longer build our own.
from ansible-lint-action.
Great idea, does the Ansible team/maintainers want to host their own image on Docker hub or can we use an already existing one by a third party?
from ansible-lint-action.
I think the Dockerfile already present in this repository works fine.
from ansible-lint-action.
I get that, but the build image needs to be stored somewhere right? We could use the GitHub registry which is free but not usable for commonly used Action. Docker hub is an obvious choice, but then who will host it?
from ansible-lint-action.
@lpenz I'm interested in hearing more on this.
Looking through the documentation, do you mean change this line: https://github.com/ansible/ansible-lint-action/blob/master/action.yml#L45
to image: 'docker://<DOCKER_IMAGE>:<TAG>'
as per this example? https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#example-using-public-docker-registry-container
from ansible-lint-action.
That line is fine
What we need to change is the retrieval of the arguments - they have to be obtained from environment variables. I did that in here:
lpenz@fd26cb9
(I can make a pull request if people want)
After that, whoever owns the "ansible" user in hub.docker.com should set it up to build the image from this repository, "latest" from master and tag versions seems appropriate.
You can then use the image by specifying - uses: docker://ansible/ansible-lint-action:VERSION
in a github workflow. The workflow will just download the image from hub.docker.com instead of building it every time.
from ansible-lint-action.
That would be great if the repo owners could implement similar so we wouldn't have to build every time. 👍🏼
from ansible-lint-action.
You can then use the image by specifying
- uses: docker://ansible/ansible-lint-action:VERSION
in a github workflow. The workflow will just download the image from hub.docker.com instead of building it every time.
I second that, especially when Ansible has already user on Docker hub with an images. (https://hub.docker.com/u/ansible). Based on my experience, building of Docker image every time consumes about 80-90% of entire GH Action runtime.
from ansible-lint-action.
I asked on #ansible-devel about who can get this onto dockerhub and I got two responses:
***sivel wonders why ansible-lint hasn't been moved out of the ansible org yet...
sivel: Should have been done a while ago
zbr: molecule container includes ansible-lint, https://github.com/ansible-community/molecule-dist
cognifloyd: Is that on dockerhub?
tadeboro: My guess would be quay.io since most of the semi-official ansible stuff ends up there.
cognifloyd: this image? https://quay.io/repository/ansible/molecule
zbr: yes, but i stopped refreshing it two weeks ago, we will restore the build pipelines.
The ansible/molecule container is currently 318.3MB
Another possible container, yokogawa/ansible-lint, is 94.98MB.
This uses python:3.8-slim (45MB) and the yokogawa one uses python:3-alpine (17.31MB), so the container could be optimized by using or following the example of the yokogawa container.
from ansible-lint-action.
@lpenz I would find a PR very helpful, it is very annoying that the action takes 3 minutes in building step...
from ansible-lint-action.
I've created a PR, here: #44
It's usable with docker://lpenz/ansible-lint-action:dockeraction
, example: https://github.com/lpenz/ansible-playbooks/blob/ladatest/.github/workflows/main.yml
Result from that example: https://github.com/lpenz/ansible-playbooks/actions/runs/490558134
from ansible-lint-action.
Related Issues (20)
- (Ability to) disable verbose output HOT 2
- Couldn't resolve module/action in ansible-lint action HOT 8
- Repository not found: ansible-community/ansible-lint-action HOT 1
- Failed to discover lintable files using git: (Warning and Error) HOT 5
- fatal: detected dubious ownership in repository at '/github/workspace' HOT 10
- Please update the action with ansible-lint 6.9.0 or later HOT 2
- Warning on every run HOT 1
- The action cannot be used as a status check in a branch protection rule HOT 1
- Ansible lint not been able to use community.general.system.timezone HOT 5
- Some ansible lint rule are not checked for the playbook HOT 1
- Update to 6.14.6
- Couldn't resolve module/action error in action but not on system HOT 1
- config ignored ? HOT 2
- Link to github marketplace is broken HOT 2
- `uses: ansible/ansible-lint@v6` yields error "unable to find version `v6`" HOT 1
- Ansible-lint-action is not returning the same result as local ansible-lint HOT 1
- `ansible-lint` outdated HOT 1
- requirements.yml not loaded from given path HOT 3
- ansible-lint fails validating the .github/workflows/ansible-lint.yml HOT 3
- Update to ansible-lint 6.17.2 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 ansible-lint-action.