Build CentOS 7 Buildbox Assets Images #21
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: Build CentOS 7 Buildbox Assets Images | |
run-name: Build CentOS 7 Buildbox Assets Images | |
on: | |
# Only allow manual triggers | |
workflow_dispatch: | |
# Temporary addition to workaround ARC invocation bug | |
push: | |
paths: | |
- .github/workflows/build-centos7-assets.yaml | |
- build.assets/Dockerfile-centos7-assets | |
branches: | |
- reed/upgrade-boringssl | |
env: | |
REGISTRY: ghcr.io | |
BUILDBOX_BASE_NAME: ghcr.io/gravitational/teleport-buildbox | |
jobs: | |
buildbox-centos7-assets: | |
name: Build CentOS 7 Asset Buildbox | |
strategy: | |
matrix: | |
# Build assets on x86 and ARM64. | |
runner: [ ubuntu-22.04-32core, ['self-hosted', 'linux', 'arm64'] ] | |
# Use bigger worker. Clang takes a while to build. | |
runs-on: ${{ matrix.runner }} | |
timeout-minutes: 720 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout Teleport | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Ensure required packages are installed | |
run: | | |
os_id=$(awk -F= '/^ID/{print $2}' /etc/os-release) | |
if [[ ! "$os_id" =~ ^ubuntu.* ]]; then | |
sudo dnf upgrade-minimal -y | |
sudo dnf install -y make | |
fi | |
# We need to keep env vars in sync, so, we can't use standard build actions | |
- name: Build buildbox assets image | |
run: cd build.assets && make build-centos7-assets | |
- name: Docker push the latest built image | |
run: docker push $(docker images -a --format '{{.Repository}}:{{.Tag}}'| head -1) |