Skip to content

Build main every 8 hours for dev #8

Build main every 8 hours for dev

Build main every 8 hours for dev #8

name: Build main every 8 hours for dev
env:
MODULES_REGISTRY: ${{ vars.DEV_REGISTRY }}
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:
schedule:
- cron: "0 */8 * * *"
defaults:
run:
shell: bash
jobs:
build_main:
runs-on: ubuntu-latest
name: Build main
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
- name: Set vars for main
run: |
MODULES_MODULE_TAG="$(echo ${{ github.ref_name }})"
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
- name: Remove unwanted software
uses: ./.github/actions/remove-unwanted-software
- uses: deckhouse/modules-actions/setup@v1
- name: Build images
run: |
source "$(werf ci-env github --as-file)"
werf build --repo=${MODULES_MODULE_SOURCE}/${MODULES_MODULE_NAME}