Update README.md #3
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: "SQS UI | Build Docker Image" | |
on: | |
workflow_dispatch: | |
inputs: | |
docker_tag: | |
description: 'Docker tag to build' | |
required: false | |
default: '' | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ | |
branches: | |
- 'v[1-9]*.*' # Matches branch names starting with 'v', followed by a single digit from 1-9, and then anything after the first dot. | |
- 'v[1-9][0-9]*.*' # Matches branch names starting with 'v', followed by a two-digit number where the first digit is 1-9, and then anything after the first dot. | |
- 'v[1-9]*.*.*' # Matches branch names in a semantic versioning format starting with 'v', a single digit from 1-9, and two more version parts, each separated by a dot. | |
- 'v[1-9][0-9]*.*.*' # Matches branch names in a semantic versioning format starting with 'v', a two-digit number where the first digit is 1-9, and two more version parts, each separated by a dot. | |
- 'v*.*.*' # Matches vx.x.x | |
- 'v**.*.*' # Matches vxx.x.x | |
- 'v**.**.*' # Matches vxx.xx.x | |
- 'v**.**.**' # Matches vxx.xx.xx | |
- 'v*.*.**' # Matches vx.x.xx | |
- 'v*.**.**' # Matches vx.xx.xx | |
- 'v*.**.*' # Matches vx.xx.x | |
- 'v**.*.**' # Matches vxx.x.xx | |
- "osmosis-main" # Matches the branch named 'osmosis-main'. | |
jobs: | |
build: | |
env: | |
docker_org: "osmolabs" | |
docker_server_url: "https://index.docker.io/v1/" | |
docker_repo: "sqs" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "SET:ENV:VARS" | |
run: | | |
if [ -z "${{ github.event.inputs.docker_tag }}" ]; then | |
BRANCH_OR_TAG=${GITHUB_REF#refs/*/} | |
echo "docker_tag=${BRANCH_OR_TAG}" >> ${GITHUB_ENV} | |
else | |
echo "docker_tag=${{ github.event.inputs.docker_tag }}" >> ${GITHUB_ENV} | |
fi | |
- 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}" |