Skip to content

Commit b940656

Browse files
authored
Package skatelet in fcos image in release (#199)
1 parent 0742208 commit b940656

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,39 @@ jobs:
298298
tar -cvf skatelet-$TARGET.tar.gz skatelet
299299
tar -cvf sind-$TARGET.tar.gz sind
300300
gh release upload ${{github.ref_name}} *.tar.gz
301+
fcos-image:
302+
needs: [release ]
303+
runs-on: ubuntu-latest
304+
if: github.ref_type == 'tag'
305+
env:
306+
GH_TOKEN: ${{ github.token }}
307+
steps:
308+
- name: Docker meta
309+
id: meta
310+
uses: docker/metadata-action@v5 # see https://github.com/docker/metadata-action
311+
with:
312+
images: ghcr.io/skateco/fcos-skate
313+
# sha = short git hash
314+
# ref = branch or tag, sanitized
315+
# semver = semver tag, sanitized
316+
tags: |
317+
type=ref,event=branch
318+
type=ref,event=pr
319+
type=semver,pattern={{version}}
320+
type=semver,pattern={{major}}.{{minor}}
321+
- name: Set up QEMU
322+
uses: docker/setup-qemu-action@v3
323+
- name: Set up Docker Buildx
324+
uses: docker/setup-buildx-action@v3
325+
- name: Build and export to Docker
326+
uses: docker/build-push-action@v6
327+
with:
328+
# Since we need the cargo workspace, we need to make the repo root the context
329+
context: ./images/fcos-skate
330+
push: true
331+
build-args: VERSION=${{ github.ref_name }}
332+
tags: ${{ steps.meta.outputs.tags }}
333+
labels: ${{ steps.meta.outputs.labels }}
334+
cache-from: type=gha
335+
cache-to: type=gha,mode=max
336+

images/fcos-skate/ContainerFile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM quay.io/fedora/fedora-coreos:stable
22

3+
ARG VERSION
34

45
RUN rpm-ostree install \
56
rsyslog \
67
wget \
78
keepalived && \
89
# set registry short name mode to permissive
910
sed -i 's|^[\#]\?short-name-mode\s\?=.*|short-name-mode=\"permissive\"|g' /etc/containers/registries.conf && \
11+
curl -sL https://raw.githubusercontent.com/skateco/skate/refs/heads/main/hack/install-skatelet.sh | INSTALL_PATH=/usr/sbin VERSION=$VERSION bash && \
1012
ostree container commit

0 commit comments

Comments
 (0)