Init CF ArgoCD Release #23
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: Init CF ArgoCD Release | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: write | |
jobs: | |
prepare-release: | |
permissions: | |
contents: write | |
actions: write # for peter-evans/create-pull-request to create branch | |
name: Automatically generate version and manifests on ${{ inputs.TARGET_BRANCH }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0 | |
with: | |
fetch-depth: 0 | |
# use personal token due to https://stackoverflow.com/questions/72110432/github-workflow-is-not-triggered-after-pushing-tags | |
token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
ref: ${{ inputs.TARGET_BRANCH }} | |
- name: Check if TARGET_VERSION is well formed. | |
run: | | |
set -xue | |
# Target version must not contain 'v' prefix | |
if echo "${{ inputs.TARGET_VERSION }}" | grep -e '^v'; then | |
echo "::error::Target version '${{ inputs.TARGET_VERSION }}' should not begin with a 'v' prefix, refusing to continue." >&2 | |
exit 1 | |
fi | |
- name: Create release | |
run: | | |
git config --global user.name "CI-Codefresh" | |
git config --global user.email "[email protected]" | |
make cf-release | |