Skip to content

How to reuse docker build on further steps/jobs without pushing to registry? #26723

Discussion options

You must be logged in to vote

I managed to save my docker image, by saving it as an artifact :-). This will allow me to use it in the following steps :-).

name: first

on: [push]

env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
id: buildx
with:
install: true
buildkitd-flags: --debug
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Bake Docker Image
uses: docker/build-push-action@v2
with:
context: .
bu…

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@lgrosz
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants