Access to main branch cache form feature branch
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, github-actions
- Domain
- build-system, ci-cd, devops
Research direction
Start by reproducing the two workflow configurations shown in the issue with Docker Buildx and GitHub Actions cache scopes. Review how cache-from and cache-to handle access between feature and main branches, then compare the observed behavior with the linked GitHub cache documentation. Done means establishing whether the configuration should work and identifying the required action or documentation change.
Written by the indexing model from the issue text.
Description
Description
Hello,
I'm trying to speed up builds on feature branches, by pulling cache form main but I'm not able to achieve that. Following Github documentation it should be possible:
Access restrictions provide cache isolation and security by creating a logical boundary between different branches or tags. Workflow runs can restore caches created in either the current branch or the default branch (usually main).
I used something like this in my workflows:
feature branch:
- name: Build and export
uses: docker/build-push-action@v5
with:
context: .
cache-from: |
type=gha
type=gha,scope=main
cache-to: type=gha,mode=min,scope=main
build-args: |
VERSION=""
load: true
tags: app:latest
outputs: type=docker,dest=build.tar
main branch:
- name: Build and export
uses: docker/build-push-action@v5
with:
context: .
cache-from: type=gha,scope=main
cache-to: type=gha,mode=min,scope=main
build-args: |
VERSION=""
load: true
tags: app:latest
outputs: type=docker,dest=build.tar
I was doing some variation of that solution, as setting only the same scope for both branches or removing scope form main branch, but nothing worked for me.
Do you have any suggestion? Thanks in advance.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 735
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 14
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/build-push-action
-
area/buildkit
docker/build-push-action#1347 · 1 comment · 1 assignee ·
-
status/triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
docker/build-push-action#1302 · 16 comments · 3 reactions ·
-
kind/enhancement status/triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
docker/build-push-action#1298 · 1 comment ·
-
status/triage
Difficulty 4/5 3-5 days Newbie friendliness 32/100
docker/build-push-action#1270 · 2 comments · 1 reaction ·
-
kind/enhancement status/triage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
docker/build-push-action#1219 · 2 comments ·
All issues in docker/build-push-action
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·