-
Notifications
You must be signed in to change notification settings - Fork 17
69 lines (59 loc) · 2.45 KB
/
node-installer.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# name: Publish node-installer image
# on:
# workflow_call:
# inputs:
# ref:
# description: 'the git ref for the associated workflow'
# type: string
# required: true
# jobs:
# # Note: assumes being called in a workflow where build has already run and
# # required artifacts have been uploaded
# publish:
# permissions:
# contents: read
# packages: write
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set RELEASE_VERSION env var
# run: |
# if [[ "${{ startsWith(inputs.ref, 'refs/tags/v')}}" == "true" ]]; then
# echo "RELEASE_VERSION=$(echo -n ${{ inputs.ref }} | cut -d '/' -f 3)" >> $GITHUB_ENV
# else
# echo "RELEASE_VERSION=$(date +%Y%m%d-%H%M%S)-g$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# fi
# - uses: actions/download-artifact@v4
# with:
# path: _artifacts
# # Setup buildx to build multiarch image: https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: setup buildx
# uses: docker/setup-buildx-action@v3
# - name: login to GitHub container registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# # Build and push node-installer image
# # TODO: remove once https://github.com/spinkube/runtime-class-manager handles this
# - name: untar musl artifacts into ./node-installer/.tmp/linux/(amd64|arm64) dir
# run: |
# mkdir -p ./node-installer/.tmp/linux/amd64
# mkdir -p ./node-installer/.tmp/linux/arm64
# for f in ./_artifacts/*/*-x86_64.tar.gz; do tar -xf $f --directory ./node-installer/.tmp/linux/amd64; done
# for f in ./_artifacts/*/*-aarch64.tar.gz; do tar -xf $f --directory ./node-installer/.tmp/linux/arm64; done
# - name: build and push node-installer image
# uses: docker/build-push-action@v5
# with:
# push: true
# tags: |
# ghcr.io/${{ github.repository }}/node-installer:${{ env.RELEASE_VERSION }}
# context: node-installer
# platforms: linux/amd64,linux/arm64
# - name: clear
# if: always()
# run: |
# rm -f ${HOME}/.docker/config.json