Skip to content

Build & Push - 3.0.804:1003050001 from env0/custom-image/spectral-image #18

Build & Push - 3.0.804:1003050001 from env0/custom-image/spectral-image

Build & Push - 3.0.804:1003050001 from env0/custom-image/spectral-image #18

Workflow file for this run

name: Build and Push Docker Image
run-name: Build & Push - ${{ inputs.sourcetag }}:${{ inputs.userid }} from ${{ inputs.folder }}
on:
workflow_dispatch:
inputs:
sourcetag:
description: 'Tag for the Docker image'
required: true
default: 'latest'
userid:
description: 'UserID for docker image'
required: true
default: '1000'
folder:
description: 'Path to the Dockerfile'
required: true
type: choice
options:
- env0/custom-image/spectral-image
- env0/custom-image/alternative
- env0/custom-image
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: away168
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push to away168
uses: docker/build-push-action@v6
with:
context: ${{ github.event.inputs.folder }}
build-args: |
BASE_TAG=${{ github.event.inputs.sourcetag }}
USER_ID=${{ github.event.inputs.userid }}
push: true
tags: |
away168/deployment-agent:${{ github.event.inputs.sourcetag }}-${{github.event.inputs.userid}}
cache-from: type=registry,ref=away168/deployment-agent:${{ github.event.inputs.sourcetag }}-${{github.event.inputs.userid}}
cache-to: type=inline
- name: Log out from Docker Hub
run: docker logout