ci: Assorted cleanups #55
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: Envoy/build-tools | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.event.inputs.head_ref || github.run_id }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build_container_linux: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: ubuntu | |
gcrPushImage: true | |
gcrImageName: envoy-build | |
- target: centos | |
gcrPushImage: false | |
name: Build (Linux ${{ matrix.target }}) | |
steps: | |
- uses: envoyproxy/toolshed/gh-actions/[email protected] | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
- run: | | |
cd build_container | |
./docker_push.sh | |
docker images | |
env: | |
OS_FAMILY: linux | |
SOURCE_BRANCH: ${{ github.ref }} | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }} | |
OS_DISTRO: ${{ matrix.target }} | |
PUSH_GCR_IMAGE: ${{ matrix.gcrPushImage }} | |
GCR_IMAGE_NAME: ${{ matrix.gcrImageName }} | |
build_container_windows: | |
name: Build (Windows) | |
runs-on: windows-2019 | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
- run: | | |
curl -fsSL --output "$TEMP/gcloud-sdk.zip" "$GCLOUD_SDK_ARCHIVE_URL" | |
echo "${GCLOUD_SDK_ARCHIVE_CHECKSUM} $TEMP/gcloud-sdk.zip" | sha256sum --check | |
unzip -q "$TEMP/gcloud-sdk.zip" -d "$PROGRAMFILES" | |
shell: bash | |
env: | |
GCLOUD_SDK_ARCHIVE_URL: https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-289.0.0-windows-x86_64.zip | |
GCLOUD_SDK_ARCHIVE_CHECKSUM: c81e80040f7f609dbc50c42cd0cd402988a5c47f467372d40b5aaca0733f46f4 | |
- run: | | |
export PATH="${PROGRAMFILES}/google-cloud-sdk/bin:${PATH}" | |
cd build_container | |
./docker_push.sh | |
docker images | |
shell: bash | |
env: | |
OS_FAMILY: windows | |
SOURCE_BRANCH: ${{ github.ref }} | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }} | |
OS_DISTRO: windows2019 | |
PUSH_GCR_IMAGE: true | |
GCR_IMAGE_NAME: envoy-build-windows | |
regenerate_linux: | |
runs-on: ubuntu-20.04 | |
if: ${{ github.event_name != 'pull_request' }} | |
permissions: | |
contents: write | |
name: Regenerate toolchains (Linux) | |
needs: | |
- build_container_linux | |
steps: | |
- id: appauth | |
uses: envoyproxy/toolshed/gh-actions/[email protected] | |
with: | |
key: ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }} | |
app_id: ${{ secrets.ENVOY_CI_UPDATE_APP_ID }} | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.appauth.outputs.token || env.GITHUB_TOKEN }} | |
- run: | | |
toolchains/regenerate.sh | |
env: | |
COMMIT_TOOLCHAINS: true | |
GCR_IMAGE_NAME: envoy-build | |
OS_FAMILY: linux | |
SOURCE_BRANCH: ${{ github.ref }} | |
regenerate_windows: | |
runs-on: windows-2019 | |
if: ${{ github.event_name != 'pull_request' }} | |
permissions: | |
contents: write | |
name: Regenerate toolchains (Windows) | |
needs: | |
- build_container_windows | |
- regenerate_linux | |
steps: | |
- id: appauth | |
uses: envoyproxy/toolshed/gh-actions/[email protected] | |
with: | |
key: ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }} | |
app_id: ${{ secrets.ENVOY_CI_UPDATE_APP_ID }} | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.appauth.outputs.token || env.GITHUB_TOKEN }} | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.16' | |
- run: | | |
toolchains/regenerate.sh | |
shell: bash | |
env: | |
COMMIT_TOOLCHAINS: true | |
GCR_IMAGE_NAME: envoy-build-windows | |
OS_FAMILY: windows | |
SOURCE_BRANCH: ${{ github.ref }} |