Skip to content

WIP: Implement GithubActions-based CF CLI Bosh release workflow #26

WIP: Implement GithubActions-based CF CLI Bosh release workflow

WIP: Implement GithubActions-based CF CLI Bosh release workflow #26

name: Create Release
on:
workflow_dispatch:
push:
defaults:
run:
shell: bash
# working-directory: ${{ }}
jobs:
bosh_release_create_candidate:
runs-on: ubuntu-latest
container:
image: "ghcr.io/${{ github.actor }}/bosh-package-cf-cli-release-ci:187042013-release-workflow-latest"
steps:
- name: Checkout cli bosh release repo
uses: actions/checkout@v4
- name: Acquire latest CF CLI V8
run: |
mkdir -p v8-cli-binary
cd v8-cli-binary
wget --trust-server-names "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=bosh-package-cf-cli-release-workflow"
tar -xvzf cf8-cli_*_linux_x86-64.tgz --wildcards 'cf*'
./cf version
- name: Create bosh release candidate
id: create-bosh-release-candidate-step
env:
TRACE: ${{ runner.debug }}
# S3 final release config to upload
# ACCESS_KEY_ID:
# SECRET_KEY:
run: |
source ./ci/scripts/create-bosh-release-candidate.sh
create_bosh_release_candidate 8
mkdir -p candidate-release-output
bosh create-release --timestamp-version --tarball=./candidate-release-output/cf-cli-dev-release.tgz
## Store tgz with bosh release candidate
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
## Claim Shepherd env
## Deploy cli bosh release candidate
## Unclaim shepherd env
## Finalize bosh release
## Get final release from assets
## Push commit with final release
- name: Finalize bosh release
# if: steps.create-bosh-release-candidate-step.outputs.blobs_updated == 'yes'
# env:
# TRACE: ${{ runner.debug }}
# S3 final release config to upload
# ACCESS_KEY_ID:
# SECRET_KEY:
run: |
set -o errexit -o nounset -o pipefail
[[ "${TRACE:-0}" == "1" ]] && set -o xtrace
# if [[ "${{ steps.create-bosh-release-candidate-step.outputs.blobs_updated }}" == "yes" ]]; then
# echo "Bosh Blobs: initial state"
# bosh blobs
## Determine next release version number
# RELEASE_VERSION=$(cat release-version/version)
# git config --global --add safe.directory "$(pwd)"
# git config user.name "github-actions[bot]"
# git config user.email "41898282+github-actions[bot]@users.noreply.github.com "
# bosh create-release --final --version="${RELEASE_VERSION}" --tarball="./cf-cli-v${RELEASE_VERSION}.tgz"
# git add --all
# git status
# git commit -m "create final release ${RELEASE_VERSION}"
ls -lah ./candidate-release-output/cf-cli-dev-release.tgz
- name: Setup tmate session
if: ${{ always() && runner.debug }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15