github.com/argoproj/argo-cd/v2@v2.10.9/.github/workflows/init-release.yaml (about) 1 name: Init ArgoCD Release 2 on: 3 workflow_dispatch: 4 inputs: 5 TARGET_BRANCH: 6 description: 'TARGET_BRANCH to checkout (e.g. release-2.5)' 7 required: true 8 type: string 9 10 TARGET_VERSION: 11 description: 'TARGET_VERSION to build manifests (e.g. 2.5.0-rc1) Note: the `v` prefix is not used' 12 required: true 13 type: string 14 15 permissions: {} 16 17 jobs: 18 prepare-release: 19 permissions: 20 contents: write # for peter-evans/create-pull-request to create branch 21 pull-requests: write # for peter-evans/create-pull-request to create a PR 22 name: Automatically generate version and manifests on ${{ inputs.TARGET_BRANCH }} 23 runs-on: ubuntu-22.04 24 steps: 25 - name: Checkout code 26 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 27 with: 28 fetch-depth: 0 29 token: ${{ secrets.GITHUB_TOKEN }} 30 ref: ${{ inputs.TARGET_BRANCH }} 31 32 - name: Check if TARGET_VERSION is well formed. 33 run: | 34 set -xue 35 # Target version must not contain 'v' prefix 36 if echo "${{ inputs.TARGET_VERSION }}" | grep -e '^v'; then 37 echo "::error::Target version '${{ inputs.TARGET_VERSION }}' should not begin with a 'v' prefix, refusing to continue." >&2 38 exit 1 39 fi 40 41 - name: Create VERSION information 42 run: | 43 set -ue 44 echo "Bumping version from $(cat VERSION) to ${{ inputs.TARGET_VERSION }}" 45 echo "${{ inputs.TARGET_VERSION }}" > VERSION 46 47 # We install kustomize in the dist directory 48 - name: Add dist to PATH 49 run: | 50 echo "/home/runner/work/argo-cd/argo-cd/dist" >> $GITHUB_PATH 51 52 - name: Generate new set of manifests 53 run: | 54 set -ue 55 make install-codegen-tools-local 56 make manifests-local VERSION=${{ inputs.TARGET_VERSION }} 57 git diff 58 59 - name: Generate version compatibility table 60 run: | 61 git stash 62 bash hack/update-supported-versions.sh 63 git add -u . 64 git stash pop 65 66 - name: Create pull request 67 uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 68 with: 69 commit-message: "Bump version to ${{ inputs.TARGET_VERSION }}" 70 title: "Bump version to ${{ inputs.TARGET_VERSION }} on ${{ inputs.TARGET_BRANCH }} branch" 71 body: Updating VERSION and manifests to ${{ inputs.TARGET_VERSION }} 72 branch: update-version 73 branch-suffix: random 74 signoff: true 75 labels: release 76 77