Skip to content

Commit

Permalink
Fix build and push workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
valderman committed Sep 13, 2024
1 parent a6d85d7 commit 75ac9ea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and push container
on:
push:
branches:
- main
- master
jobs:
build-and-push-arm64:
name: Build and push ARM64 container
Expand All @@ -13,8 +13,8 @@ jobs:
- run: |
VER_LINE="$(grep 'image: sebas:5000/github-runner:arm64' deployment.yml)"
VER="$(echo "$VER_LINE"| sed -e 's/\s\+image: sebas:5000\/github-runner:arm64-\(.\)/\1/')"
podman build --platform linux/arm64 --build-arg ARCH=arm64 sebas:5000/github-runner:arm64-$VER
podman push sebas:5000/github-runner:arm64-$VER
podman build -t "sebas:5000/github-runner:arm64-$VER" .
podman push "sebas:5000/github-runner:arm64-$VER"
build-and-push-amd64:
name: Build and push AMD64 container
runs-on: [self-hosted, x64]
Expand All @@ -24,5 +24,5 @@ jobs:
- run: |
VER_LINE="$(grep 'image: sebas:5000/github-runner:amd64' deployment.yml)"
VER="$(echo "$VER_LINE"| sed -e 's/\s\+image: sebas:5000\/github-runner:amd64-\(.\)/\1/')"
podman build --platform linux/amd64 --build-arg ARCH=amd64 sebas:5000/github-runner:amd64-$VER
podman push sebas:5000/github-runner:amd64-$VER
podman build -t "sebas:5000/github-runner:amd64-$VER" .
podman push "sebas:5000/github-runner:amd64-$VER"
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG ARCH=amd64
FROM --platform=${ARCH} debian:bookworm-slim
FROM debian:bookworm-slim

ENV GITHUB_PAT ""
ENV GITHUB_TOKEN ""
Expand Down
6 changes: 6 additions & 0 deletions deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
containers:
- name: github-runner-arm64
image: sebas:5000/github-runner:arm64-1
securityContext:
privileged: true
runAsUser: 1000
env:
- name: GITHUB_OWNER
value: koditoriet
Expand Down Expand Up @@ -55,6 +58,9 @@ spec:
containers:
- name: github-runner-amd64
image: sebas:5000/github-runner:amd64-1
securityContext:
privileged: true
runAsUser: 1000
env:
- name: GITHUB_OWNER
value: koditoriet
Expand Down

0 comments on commit 75ac9ea

Please sign in to comment.