Skip to content

Commit

Permalink
Add building local images
Browse files Browse the repository at this point in the history
  • Loading branch information
oxpa committed Sep 4, 2024
1 parent 79ba52b commit ac2e8c5
Showing 1 changed file with 57 additions and 4 deletions.
61 changes: 57 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,67 @@ jobs:
driver-opts: network=host


- name: Build test images
- name: Build A as latest image
id: build
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "tests/Dockerfile"
context: "."
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:9090/tests/image1:tag1,localhost:9090/tests/image2:tag1"
tags: "localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "A"

- name: Build B as latest image
id: build
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "B"

- name: Build AB as latest image
id: build
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:latest,localhost:5000/image:AB"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "AB"

- name: Build A as latest and A
id: build
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:A,localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "A"

- name: Build AB for latest
id: build
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "AB"

0 comments on commit ac2e8c5

Please sign in to comment.