Skip to content

Commit

Permalink
chore(cicd): add input tag for manual build on self-hosted runner
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Korolev <[email protected]>
  • Loading branch information
universal-itengineer committed Mar 4, 2024
1 parent ed8d27f commit c863252
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build_dev_man.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,44 @@ name: Build and push for dev (Manually)

env:
MODULES_REGISTRY: ${{ vars.DEV_REGISTRY }}
CI_COMMIT_REF_NAME: ${{ github.ref_name }}
CI_COMMIT_REF_NAME: ${{ github.event.inputs.tag }}
# CI_COMMIT_REF_NAME: ${{ github.ref_name }}
MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }}
MODULES_MODULE_SOURCE: ${{ vars.DEV_MODULE_SOURCE }}
MODULES_REGISTRY_LOGIN: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
MODULES_REGISTRY_PASSWORD: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}

on:
workflow_dispatch:
inputs:

tag:
description: "The module's tag, which must pr654 For example: pr56"
type: string
required: true
# pull_request:
# types: [ opened, edited, synchronize ]
# push:
# branches:
# - main
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.number || github.event.inputs.tag }}
cancel-in-progress: true

jobs:
tag_validation:
runs-on: [self-hosted, test-vm-runner]
steps:
- name: Validation for tag
run: |
echo ${{ github.event.inputs.tag }} | grep -P '^pr\d+$'
shell: bash

show_dev_manifest:
runs-on: [self-hosted, test-vm-runner]
name: Show
needs:
- tag_validation
steps:
- name: Set vars for PR
if: ${{ github.ref_name != 'main' }}
Expand Down Expand Up @@ -82,6 +99,8 @@ jobs:
lint:
runs-on: [self-hosted, test-vm-runner]
name: Run linter
needs:
- tag_validation
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v5
Expand Down Expand Up @@ -129,6 +148,7 @@ jobs:
runs-on: [self-hosted, test-vm-runner]
name: Build and Push images
needs:
- tag_validation
- lint
- test
steps:
Expand Down

0 comments on commit c863252

Please sign in to comment.