Skip to content

Docker Build

Docker Build #134

Workflow file for this run

name: 'Docker Build'
on:
workflow_dispatch:
inputs:
buildType:
type: choice
description: 'Build Type'
required: true
options:
- Testing
- Release
buildVersion:
description: 'Build Version'
required: true
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Downloading Packages
run: |
mkdir $HOME/.testsigma_os
aws s3 cp s3://hybrid-staging.testsigma.com/testsigma_os $HOME/.testsigma_os --recursive
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_DEFAULT_OUTPUT: json
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Building
run: |
if [[ "${{ github.event.inputs.buildType }}" == "Testing" ]]; then
bash deploy/docker/build.sh --DOCKER_VERSION=v${{ github.event.inputs.buildVersion }} --AGENT_TAG=v${{ github.event.inputs.buildVersion }} --IMAGE_NAME=server-dev
fi
if [[ "${{ github.event.inputs.buildType }}" == "Release" ]]; then
bash deploy/docker/build.sh --DOCKER_VERSION=v${{ github.event.inputs.buildVersion }} --AGENT_TAG=v${{ github.event.inputs.buildVersion }} --IMAGE_NAME=server
fi
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_DEFAULT_OUTPUT: json