fix(aws): Fix userData getting lost when cloning an AWS server group that uses launch templates (#6771) (backport #10132) #677
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: PR Build | |
on: [ pull_request ] | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g | |
CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker | |
NODE_VERSION: 12.16.0 | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- uses: actions/setup-java@v2 | |
with: | |
java-version: 11 | |
distribution: 'zulu' | |
cache: 'gradle' | |
- name: Prepare build variables | |
id: build_variables | |
run: | | |
echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/} | |
echo ::set-output name=VERSION::"$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-pr-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" | |
- name: Build | |
env: | |
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} | |
run: ./gradlew build | |
- name: Build slim container image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile.slim | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest" | |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}" | |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-slim" | |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-slim" | |
- name: Build ubuntu container image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile.ubuntu | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-ubuntu" | |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-ubuntu" |