diff --git a/.github/workflows/release_module_release-channels.yml b/.github/workflows/release_module_release-channels.yml index fcaac8a11e..afc872f53d 100644 --- a/.github/workflows/release_module_release-channels.yml +++ b/.github/workflows/release_module_release-channels.yml @@ -57,6 +57,10 @@ on: default: true description: "Set to true if build is required" +defaults: + run: + shell: bash + jobs: print-vars: runs-on: [self-hosted, large] @@ -88,10 +92,20 @@ jobs: - name: ECHO VAR run: | echo $MODULES_MODULE_SOURCE + - name: Validation for tag + run: | + echo ${{ github.event.inputs.tag }} | grep -P '^v\d+\.\d+\.\d+.*$' + - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Get specified tag + run: git fetch --tags + + - name: Checkout specified tag + run: git checkout tags/${{ github.event.inputs.tag }} + - name: Login to PROD_REGISTRY uses: deckhouse/modules-actions/setup@v2 with: @@ -136,10 +150,19 @@ jobs: - name: ECHO VAR run: | echo $MODULES_MODULE_SOURCE + - name: Validation for tag + run: | + echo ${{ github.event.inputs.tag }} | grep -P '^v\d+\.\d+\.\d+.*$' - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Get specified tag + run: git fetch --tags + + - name: Checkout specified tag + run: git checkout tags/${{ github.event.inputs.tag }} + - uses: deckhouse/modules-actions/setup@v2 with: registry: ${{ vars.PROD_REGISTRY }} @@ -190,10 +213,20 @@ jobs: - name: ECHO VAR run: | echo $MODULES_MODULE_SOURCE + - name: Validation for tag + run: | + echo ${{ github.event.inputs.tag }} | grep -P '^v\d+\.\d+\.\d+.*$' - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Get specified tag + run: git fetch --tags + + - name: Checkout specified tag + run: git checkout tags/${{ github.event.inputs.tag }} + + - name: Login to PROD_REGISTRY uses: deckhouse/modules-actions/setup@v2 with: @@ -240,12 +273,17 @@ jobs: echo $MODULES_MODULE_SOURCE - name: Validation for tag run: | - echo ${{ github.event.inputs.tag }} | grep -P '^v\d+\.\d+\.\d+' - shell: bash + echo ${{ github.event.inputs.tag }} | grep -P '^v\d+\.\d+\.\d+.*$' - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Get specified tag + run: git fetch --tags + + - name: Checkout specified tag + run: git checkout tags/${{ github.event.inputs.tag }} + - name: Login to PROD_REGISTRY uses: deckhouse/modules-actions/setup@v2 with: