Skip to content

Make and publish container images #153

Make and publish container images

Make and publish container images #153

Workflow file for this run

name: CI
on:
workflow_dispatch:
inputs:
docker_hub_registry:
type: string
description: DockerHub registry
default: docker.io
docker_hub_organization:
type: string
description: DockerHub organization
default: mahendrapaipuri
push:
paths:
- "go.sum"
- "go.mod"
- "**.go"
- ".github/workflows/**"
- ".golangci.yml"
branches: [main]
pull_request:
branches: [main]
permissions:
# All nested workflows will inherit these permissions and so no need to declare
# in each step file
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-lint:
uses: ./.github/workflows/step_tests-lint.yml
test-unit:
needs: [test-lint]
uses: ./.github/workflows/step_tests-unit.yml
# To update coverage badge
permissions:
contents: write
test-e2e:
needs: [test-lint]
uses: ./.github/workflows/step_tests-e2e.yml
build:
needs: [test-lint, test-unit, test-e2e]
uses: ./.github/workflows/step_build.yml
packaging:
needs: [build]
uses: ./.github/workflows/step_packaging.yml
docker:
needs: [build]
uses: ./.github/workflows/step_docker.yml
# Since workflow_dispatch inputs are only available on manual triggers
# we need to set default values to the context vars here
with:
registry: ${{ inputs.docker_hub_registry || 'docker.io' }}
organization: ${{ inputs.docker_hub_organization || 'mahendrapaipuri' }}
secrets:
login: ${{ secrets.DOCKER_HUB_LOGIN }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# quay:
# needs: [build]
# uses: ./.github/workflows/step_quay.yml
# with:
# registry: "quay.io"
# organization: ${{ inputs.quay_organization }}
# login: ${{ secrets.quay_login }}
# password: ${{ secrets.quay_password }}