Testing - add GHA workflows to replace Drone #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI on Push and Pull Request | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
env: | |
IMAGE: rancher/hyperkube-base | |
jobs: | |
test-prepare-binaries: | |
permissions: | |
contents: read | |
strategy: | |
matrix: | |
os: [linux] | |
arch: [ amd64, arm64 ] | |
runs-on: org-${{ github.repository_owner_id }}-${{ matrix.arch }}-k8s | |
container: ubuntu:22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Prepare binaries | |
run: | | |
apt-get update | |
apt-get install -y make curl | |
make ARCH=${{ matrix.arch }} scripts/iptables-wrapper-installer.sh | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.IMAGE }} | |
flavor: | | |
latest=false | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Test build Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false | |
tags: "${{ steps.meta.outputs.tags }}" | |
platforms: "${{ matrix.os }}/${{ matrix.arch }}" | |
labels: "${{ steps.meta.outputs.labels }}" | |
build-args: | | |
ARCH="${{ matrix.arch }}" |