Skip to content

Commit

Permalink
[ghactions] Build pause image tarball and upload to release
Browse files Browse the repository at this point in the history
  • Loading branch information
EricMountain committed Jan 4, 2023
1 parent 6e60c42 commit f799dd7
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/dd-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,31 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Build
env:
KUBE_BUILD_PLATFORMS: ${{ matrix.platform }}
KUBE_RELEASE_RUN_TESTS: n
run: make quick-release KUBE_BUILD_PLATFORMS=$KUBE_BUILD_PLATFORMS
- name: Build pause container image
shell: bash
env:
KUBE_BUILD_PLATFORM: ${{ matrix.platform }}
REGISTRY: k8s.datadoghq.com
run: |
TARGET_PLATFORM="${KUBE_BUILD_PLATFORM/\//-}"
OS="${KUBE_BUILD_PLATFORM%%/*}"
ARCH="${KUBE_BUILD_PLATFORM##*/}"
cd ./build/pause
PAUSE_TAG=$(awk '/^TAG = [0-9.]+$/ { print $3}' Makefile)
make container OS=${OS} ARCH=${ARCH} REGISTRY=${REGISTRY}
cd ../..
docker save -o _output/release-tars/pause-${TARGET_PLATFORM}.tar ${REGISTRY}/pause:${PAUSE_TAG}-${TARGET_PLATFORM}
gzip -v _output/release-tars/pause-${TARGET_PLATFORM}.tar
echo ${PAUSE_TAG} > pause-tag.txt
tar czf _output/release-tars/pause-tag-${TARGET_PLATFORM}.tar.gz pause-tag.txt
ls -l _output/release-tars
- name: Calculate checksums
id: calculate_checksums
shell: bash
Expand Down Expand Up @@ -91,7 +111,9 @@ jobs:
assets: [
"kubernetes-client",
"kubernetes-node",
"kubernetes-server"
"kubernetes-server",
"pause",
"pause-tag"
]
platform: ["linux-arm64","linux-amd64"]
extension: ["tar.gz", "tar.gz.sha256sum"]
Expand Down

0 comments on commit f799dd7

Please sign in to comment.