Release #4
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: Release | |
# Controls when the workflow will run | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: Git tag to build release from | |
required: true | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
release: | |
runs-on: [self-hosted, x64, linux, eks, us, general, dev] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.tag }} | |
- name: Get SHA | |
id: get-sha | |
run: echo "::set-output name=sha::$(git log -1 --format='%H')" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ steps.get-sha.outputs.sha }} | |
- name: Print Disk Usage | |
run: | | |
df -ah | |
docker buildx du | |
- name: Setup AWS | |
uses: ironsource-mobile/github-actions-and-workflows/.github/actions/setup-aws/action.yaml@main | |
with: | |
aws_role_arn: arn:aws:iam::032106861074:role/github-runners-devops-team-role | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Set env | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build JVM Docker Image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
ECR_REPOSITORY: ${{ github.event.repository.name }} | |
IMAGE_TAG: ${{ github.event.inputs.tag }} | |
run: | | |
docker build agent/docker/jvm/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG-jvm -t $ECR_REGISTRY/$ECR_REPOSITORY:latest | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG-jvm | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest | |
# - name: Build JVM Docker Image | |
# uses: docker/build-push-action@v1 | |
# with: | |
# dockerfile: 'agent/docker/jvm/Dockerfile' | |
# repository: $ECR_REGISTRY/$ECR_REPOSITORY | |
# tags: ${{ steps.vars.outputs.tag }}-jvm | |
# env: | |
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
# ECR_REPOSITORY: ${{ github.event.repository.name }} | |
# IMAGE_TAG: ${{ github.event.inputs.tag }} | |
# - name: Build JVM Alpine Docker Image | |
# uses: docker/build-push-action@v1 | |
# with: | |
# dockerfile: 'agent/docker/jvm/Dockerfile.alpine' | |
# username: ${{ secrets.DOCKER_HUB_USER }} | |
# password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
# repository: ironsource-mobile/kubectl-flame | |
# tags: ${{ steps.vars.outputs.tag }}-jvm-alpine | |
# - name: Build BPF Docker Image | |
# uses: docker/build-push-action@v1 | |
# with: | |
# dockerfile: 'agent/docker/bpf/Dockerfile' | |
# username: ${{ secrets.DOCKER_HUB_USER }} | |
# password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
# repository: ironsource-mobile/kubectl-flame | |
# tags: ${{ steps.vars.outputs.tag }}-bpf | |
# - name: Build Python Docker Image | |
# uses: docker/build-push-action@v1 | |
# with: | |
# dockerfile: 'agent/docker/python/Dockerfile' | |
# username: ${{ secrets.DOCKER_HUB_USER }} | |
# password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
# repository: ironsource-mobile/kubectl-flame | |
# tags: ${{ steps.vars.outputs.tag }}-python | |
# - name: Build Ruby Docker Image | |
# uses: docker/build-push-action@v1 | |
# with: | |
# dockerfile: 'agent/docker/ruby/Dockerfile' | |
# username: ${{ secrets.DOCKER_HUB_USER }} | |
# password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
# repository: ironsource-mobile/kubectl-flame | |
# tags: ${{ steps.vars.outputs.tag }}-ruby | |
# - name: Build perf Docker Image | |
# uses: docker/build-push-action@v1 | |
# with: | |
# dockerfile: 'agent/docker/perf/Dockerfile' | |
# username: ${{ secrets.DOCKER_HUB_USER }} | |
# password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
# repository: ironsource-mobile/kubectl-flame | |
# tags: ${{ steps.vars.outputs.tag }}-perf | |
# - name: Setup Go | |
# uses: actions/setup-go@v1 | |
# with: | |
# go-version: 1.14 | |
# - name: GoReleaser | |
# uses: goreleaser/goreleaser-action@v1 | |
# with: | |
# version: latest | |
# args: release --rm-dist | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Update new version in krew-index | |
# uses: rajatjindal/[email protected] |