Skip to content

Build CI Buildbox Images #671

Build CI Buildbox Images

Build CI Buildbox Images #671

name: Build CI Buildbox Images
run-name: Build CI Buildbox Images
on:
push:
paths:
- .github/workflows/build-ci-buildbox-images.yaml
- build.assets/Dockerfile
- build.assets/Dockerfile-centos7
- build.assets/Makefile
- build.assets/images.mk
- build.assets/versions.mk
branches:
- master
- branch/**
env:
REGISTRY: ghcr.io
BUILDBOX_BASE_NAME: ghcr.io/gravitational/teleport-buildbox
jobs:
buildbox:
name: Build Ubuntu Buildbox
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Teleport
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Login to registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# We need to keep env vars in sync, so, we can't use standard build actions
- name: Build buildbox image
run: cd build.assets && make buildbox
- name: Docker push the latest built image
run: docker push $(docker images -a --format '{{.Repository}}:{{.Tag}}'| head -1)
buildbox-centos7:
name: Build CentOS 7 Buildbox
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Teleport
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Login to registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# We need to keep env vars in sync, so, we can't use standard build actions
- name: Build buildbox image
run: cd build.assets && make buildbox-centos7
- name: Docker push the latest built image
run: docker push $(docker images -a --format '{{.Repository}}:{{.Tag}}'| head -1)