Skip to content

Build images and create release #4

Build images and create release

Build images and create release #4

name: Build images and create Octopus release
run-name: 'Build images and create release'
on:
workflow_dispatch:
pull_request:
paths-ignore:
- README.md
push:
branches:
- main
paths-ignore:
- README.md
jobs:
generate_date_version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.date-version.outputs.version }}
steps:
# manually generate version until permissions are sorted
# - name: Generate Date Version
# id: date-version
# uses: StackEng/CoreEngineering.CITools/actions/date_version@v1
- name: Set Version
if: ${{ github.ref_name == 'main' }}
run: |
# Year.Month.Day.HourMinSec (no zero padding in each segment)
VERSION="$(date -u +'%Y.%-m.%-d.%-H%M%S')"
echo "version=$version" >> $env:GITHUB_OUTPUT
echo "generated version: $version"
build_docker:
needs: [generate_date_version]
uses: ./.github/workflows/build_app_docker_image.yml
with:
version: ${{ needs.generate_date_version.outputs.version }}
secrets:
registry_username: ${{ secrets.CLOUDSMITH_API_ACCOUNT }}
registry_password: ${{ secrets.CLOUDSMITH_API_KEY }}
nuget_user: ${{ secrets.CLOUDSMITH_API_ACCOUNT }}
nuget_password: ${{ secrets.CLOUDSMITH_API_KEY }}
build_cnab:
uses: ./.github/workflows/build_cnab.yml
needs: [generate_date_version]
with:
version: ${{ needs.generate_date_version.outputs.version }}
secrets:
registry_username: ${{ secrets.CLOUDSMITH_API_ACCOUNT }}
registry_password: ${{ secrets.CLOUDSMITH_API_KEY }}