Skip to content

Commit f09aba0

Browse files
committed
Build and push the container images using just the Makefile
No need to maintain 2 different ways of building when we can just let the Makefile do it. Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
1 parent 2c4818d commit f09aba0

File tree

2 files changed

+4
-31
lines changed

2 files changed

+4
-31
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@ jobs:
1616
- name: Set up Docker Buildx
1717
uses: docker/setup-buildx-action@v2
1818

19-
- name: Build and push hook-bootkit
20-
uses: docker/build-push-action@v3
21-
with:
22-
context: ./hook-bootkit/
23-
platforms: linux/amd64,linux/arm64
24-
tags: quay.io/tinkerbell/hook-bootkit:latest
25-
26-
- name: Build and push hook-docker
27-
uses: docker/build-push-action@v3
28-
with:
29-
context: ./hook-docker/
30-
platforms: linux/amd64,linux/arm64
31-
tags: quay.io/tinkerbell/hook-docker:latest
32-
3319
- uses: cachix/install-nix-action@v17
3420
with:
3521
nix_path: nixpkgs=channel:nixos-unstable
@@ -43,7 +29,6 @@ jobs:
4329
- name: Build
4430
run: nix-shell --run 'make TAG=${{ github.sha }} dist'
4531

46-
# TODO: add artifacts for the built images
4732
- uses: actions/upload-artifact@v3
4833
with:
4934
name: hook-${{ github.sha }}.tar.gz

.github/workflows/push.yaml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,6 @@ jobs:
3030
run: |
3131
echo ::set-output name=short::$(git rev-parse --short HEAD)
3232
33-
- name: Build and push hook-bootkit
34-
uses: docker/build-push-action@v3
35-
with:
36-
context: ./hook-bootkit/
37-
platforms: linux/amd64,linux/arm64
38-
push: ${{ github.actor != 'dependabot[bot]' }}
39-
tags: quay.io/tinkerbell/hook-bootkit:latest,quay.io/tinkerbell/hook-bootkit:sha-${{steps.commitid.outputs.short}}
40-
41-
- name: Build and push hook-docker
42-
uses: docker/build-push-action@v3
43-
with:
44-
context: ./hook-docker/
45-
platforms: linux/amd64,linux/arm64
46-
push: ${{ github.actor != 'dependabot[bot]' }}
47-
tags: quay.io/tinkerbell/hook-docker:latest,quay.io/tinkerbell/hook-docker:sha-${{steps.commitid.outputs.short}}
48-
4933
- uses: cachix/install-nix-action@v17
5034
with:
5135
nix_path: nixpkgs=channel:nixos-unstable
@@ -58,6 +42,10 @@ jobs:
5842

5943
- name: Build & Deploy
6044
run: |
45+
# Build and push the container images
46+
nix-shell --run 'make TAG=latest push'
47+
nix-shell --run 'make TAG=sha-${{steps.commitid.outputs.short}} push'
48+
# Build and push the linuxkit images
6149
nix-shell --run 'make TAG=latest deploy'
6250
nix-shell --run 'make TAG=sha-${{steps.commitid.outputs.short}} deploy'
6351

0 commit comments

Comments
 (0)