Skip to content

SCALRCORE-37058 Add quota to configure Scalr runner image per account… #12

SCALRCORE-37058 Add quota to configure Scalr runner image per account…

SCALRCORE-37058 Add quota to configure Scalr runner image per account… #12

Workflow file for this run

name: Release Runner Image
on:
push:
tags:
- "*.*.*"
jobs:
build:
name: Build and Push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Read Versions
id: versions
run: |
echo "kubectl=$(grep '^kubectl=' versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "gcloud=$(grep '^gcloud=' versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "aws_cli=$(grep '^aws_cli=' versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "azure_cli=$(grep '^azure_cli=' versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "scalr_cli=$(grep '^scalr_cli=' versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "python=$(grep '^python=' versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "python_release=$(grep '^python_release=' versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
- name: Format Image Tag
id: image_tag
run: |
echo "tag=${GITHUB_REF#refs/tags/}" | tee -a $GITHUB_OUTPUT
- name: Build Docker image
uses: docker/build-push-action@v6
with:
build-args: |
KUBECTL_VERSION=${{ steps.versions.outputs.kubectl }}
GCLOUD_VERSION=${{ steps.versions.outputs.gcloud }}
AWS_CLI_VERSION=${{ steps.versions.outputs.aws_cli }}
AZURE_CLI_VERSION=${{ steps.versions.outputs.azure_cli }}
SCALR_CLI_VERSION=${{ steps.versions.outputs.scalr_cli }}
PYTHON_VERSION=${{ steps.versions.outputs.python }}
PYTHON_RELEASE=${{ steps.versions.outputs.python_release }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=scalr/runner:buildcache
cache-to: type=registry,ref=scalr/runner:buildcache
push: true
tags: |
scalr/runner:latest
scalr/runner:${{ steps.image_tag.outputs.tag }}
- name: Build Docker image (Python 3.9)
uses: docker/build-push-action@v6
with:
build-args: |
KUBECTL_VERSION=${{ steps.versions.outputs.kubectl }}
GCLOUD_VERSION=${{ steps.versions.outputs.gcloud }}
AWS_CLI_VERSION=${{ steps.versions.outputs.aws_cli }}
AZURE_CLI_VERSION=${{ steps.versions.outputs.azure_cli }}
SCALR_CLI_VERSION=${{ steps.versions.outputs.scalr_cli }}
PYTHON_VERSION=3.9.25
PYTHON_RELEASE=20251031
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=scalr/runner:buildcache-python39
cache-to: type=registry,ref=scalr/runner:buildcache-python39
push: true
tags: |
scalr/runner:latest-python39
scalr/runner:${{ steps.image_tag.outputs.tag }}-python39
update_changelog:
name: Update Changelog
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install Changelog Generator
run: gem install github_changelog_generator
- name: Update CHANGELOG.md
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
github_changelog_generator -u Scalr -p runner --output CHANGELOG.md
git add CHANGELOG.md
if [ ! -n "$(git status -s)" ]; then
echo "NOTHING TO COMMIT"
else
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commit -m "Update CHANGELOG.md"
git push --no-verify
fi