Skip to content

Alessandro/automatically deploy on stage (#142) #30

Alessandro/automatically deploy on stage (#142)

Alessandro/automatically deploy on stage (#142) #30

name: "SQS UI | Build Docker Image"
on:
workflow_dispatch:
push:
branches: [ "main", "v*.*.*" ]
pull_request:
branches: [ "main", "v*.*.*" ]
jobs:
build:
env:
docker_org: "osmolabs"
docker_server_url: "https://index.docker.io/v1/"
docker_repo: "sqs"
app_name: "sqs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "SET:ENV:VARS"
run: |
echo "docker_tag=ui-${GITHUB_SHA::7}" >> ${GITHUB_ENV}
- name: "DOCKER:BUILD:CHECK:PUSH"
uses: iDevOps-io/idevops-git-actions/docker_build_check_tag_and_push@main
with:
docker_username: "${{ secrets.DOCKERHUB_USERNAME }}"
docker_password: "${{ secrets.DOCKERHUB_TOKEN }}"
docker_org: "${{ env.docker_org }}"
docker_image: "${{ env.docker_repo }}"
docker_tag: "${{ env.docker_tag }}"
docker_file_location: "./"
- name: "DOCKER:IMAGE:SCAN:ANCHORE"
if: contains(github.event.head_commit.message, '[docker scan]')
uses: iDevOps-io/idevops-git-actions/execute_docker_scan_grype@main
with:
docker_image_name: "${{ env.docker_org }}/${{ env.docker_repo }}:${{ env.docker_tag }}"
- name: "OUTPUT:DOCKER_IMAGE_NAME"
run: |
echo "DOCKER_IMAGE_NAME: ${{ env.docker_org }}/${{ env.docker_repo }}:${docker_tag}"