Build main every 8 hours for dev #12
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: 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} |