Skip to content

promote-dev-to-messy #13379

promote-dev-to-messy

promote-dev-to-messy #13379

name: promote-dev-to-messy
on:
schedule:
- cron: '15 * * * *'
workflow_dispatch:
inputs:
dry-run:
description: 'Dry run'
required: false
default: 'false'
type: choice
options:
- "true"
- "false"
auto-merge:
description: 'Auto merge'
required: false
default: 'false'
type: choice
options:
- "true"
- "false"
push:
tags:
- 'v*-rc*' # e.g. v1.0-rc1, v20.15.10-rc5
jobs:
promote-dev-to-messy:
name: Promote dev to messy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
# fetch-depth: 0 needed to get all branches
fetch-depth: 0
path: test-deploy
token: ${{ secrets.PUSHER_ROBOT_GITHUB_TOKEN }}
- name: Set ENV
run: |
# Generate unique EOF value to prevent injection attack
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "IMAGES<<$EOF" >> $GITHUB_ENV
cat .github/config/promote/dev-to-messy.json >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV
- name: Promote (workflow_dispatch)
uses: kustomize-everything/action-promote@v3.7.1
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
target-repo: kustomize-everything/test-deploy
target-branch: main
working-directory: test-deploy
images: ${{ env.IMAGES }}
github-token: ${{ secrets.PUSHER_ROBOT_GITHUB_TOKEN }}
promotion-method: pull_request
dry-run: ${{ inputs.dry-run }}
auto-merge: ${{ inputs.auto-merge }}
- name: Promote (scheduled)
uses: kustomize-everything/action-promote@v3.7.1
if: ${{ github.event_name == 'schedule' }}
with:
target-repo: kustomize-everything/test-deploy
target-branch: main
working-directory: test-deploy
images: ${{ env.IMAGES }}
github-token: ${{ secrets.PUSHER_ROBOT_GITHUB_TOKEN }}
promotion-method: pull_request
dry-run: false
auto-merge: false