Fix bash command #22
This file contains hidden or 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: Conveyor Executables | |
| on: | |
| push | |
| # workflow_dispatch: | |
| # inputs: | |
| # signed: | |
| # description: 'Sign Executables' | |
| # required: true | |
| # type: boolean | |
| # default: false | |
| # environment: | |
| # description: 'Environment' | |
| # required: true | |
| # default: 'dev' | |
| # type: choice | |
| # options: | |
| # - dev | |
| # - prod | |
| # cache_key: | |
| # description: Optional cache key used to store the Conveyor installation and task cache. | |
| # type: string | |
| # required: false | |
| # default: 'conveyor' | |
| # cache_path: | |
| # description: Optional path to the location where Conveyor will be installed and keep the task cache. | |
| # type: string | |
| # required: false | |
| # default: '.conveyor' | |
| # conveyor_version: | |
| # description: Version of Conveyor to run. | |
| # type: string | |
| # required: false | |
| # default: '20.0' | |
| env: | |
| CONVEYOR_AGREE_TO_LICENSE: 1 | |
| environment: "dev" | |
| cache_path: ".conveyor" | |
| cache_key: "conveyor" | |
| sign_executables: false | |
| conveyor_version: "20.0" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check cache | |
| id: check_cache | |
| shell: bash | |
| run: | | |
| [ -d "${{ env.cache_path }}" ] && FOUND=true || FOUND=false | |
| echo "found=$FOUND" >> "$GITHUB_OUTPUT" | |
| - name: Load cache | |
| if: ${{ steps.check_cache.outputs.found != 'true' }} | |
| uses: actions/cache@v4 | |
| with: | |
| key: ${{ env.cache_key }}-${{ github.run_id }} | |
| path: ${{ env.cache_path }} | |
| restore-keys: ${{ env.cache_key }} | |
| - name: Cache clojure dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository | |
| ~/.gitlibs | |
| key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn', '**/deps.edn', '**/bb.edn') }} | |
| restore-keys: cljdeps- | |
| - name: Setup Conveyor | |
| shell: bash | |
| run: | | |
| if [ ! -d "${{ env.cache_path }}/install/conveyor-${{ env.conveyor_version }}" ]; then | |
| wget https://downloads.hydraulic.dev/conveyor/conveyor-${{ env.conveyor_version }}-linux-amd64.tar.gz | |
| mkdir -p ${{ env.cache_path }}/install | |
| tar xzvf conveyor-${{ env.conveyor_version }}-linux-amd64.tar.gz -C ${{ env.cache_path }}/install | |
| fi | |
| echo "What is inside '${{env.cache_path}}/install/conveyor-${{env.conveyor_version}}/bin':" | |
| ls ${{env.cache_path}}/install/conveyor-${{env.conveyor_version}}/bin | |
| echo "HOME: $HOME" | |
| echo "GH Workspace: ${{ github.workspace }}" | |
| mkdir -p $HOME/.local/bin | |
| ln -s ${{ env.cache_path }}/install/conveyor-${{env.conveyor_version }}/bin/conveyor $HOME/.local/bin/ | |
| echo '$HOME/.local/bin' | |
| ls $HOME/.local/bin | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # - name: Prepare java | |
| # uses: actions/setup-java@v4 | |
| # with: | |
| # distribution: 'temurin' | |
| # java-version: '21' | |
| # - name: Install clojure tools | |
| # uses: DeLaGuardo/setup-clojure@13.1 | |
| # with: | |
| # cli: 'latest' | |
| - name: Setup Babashka | |
| uses: turtlequeue/setup-babashka@v1.7.0 | |
| with: | |
| babashka-version: 1.3.189 | |
| # - name: Set the version | |
| # run: | | |
| # VERSION=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\///g') | |
| # echo "version=$VERSION" >> "$GITHUB_ENV" | |
| - name: Check shell | |
| id: check_shell | |
| shell: bash | |
| run: | | |
| export PATH="$PATH:${{ env.cache_path }}/install/conveyor-${{ env.conveyor_version }}/bin" | |
| bb '(System/getenv "SHELL")' | |
| bb path-test | |
| bb which-test | |
| bb ls-test | |
| bb conveyor-test | |
| # - name: Set the date | |
| # run: | | |
| # DATE=$( echo $(date '+%Y-%m-%d')) | |
| # echo "date=$DATE" >> "$GITHUB_ENV" | |
| # - name: Set release name | |
| # run: | | |
| # RELEASE=$(echo "$version ($date)") | |
| # echo "release=$RELEASE" >> "$GITHUB_ENV" | |
| # - name: Download VMS [DEV] | |
| # if: ${{ env.environment == 'dev' }} | |
| # env: | |
| # VMS_URL: ${{ secrets.DEV_VMS_URL }} | |
| # VMS_AUTH_TOKEN: ${{ secrets.DEV_VMS_SECRET_TOKEN }} | |
| # run: | | |
| # cd projects/behave | |
| # clojure -X:download-vms :url "$VMS_URL" :auth-token "$VMS_AUTH_TOKEN" | |
| # - name: Download VMS [PROD] | |
| # if: ${{ env.environment == 'prod' }} | |
| # env: | |
| # VMS_URL: ${{ secrets.VMS_URL }} | |
| # VMS_AUTH_TOKEN: ${{ secrets.VMS_SECRET_TOKEN }} | |
| # run: | | |
| # cd projects/behave | |
| # clojure -X:download-vms :url "$VMS_URL" :auth-token "$VMS_AUTH_TOKEN" | |
| # - name: Build Executables | |
| # run: | | |
| # export PATH="$PATH:${{ env.cache_path }}/install/conveyor-${{ env.conveyor_version }}/bin" | |
| # cd projects/behave | |
| # mv resources/config.standalone.edn resources/config.edn | |
| # echo "{:version $version}" > resources/version.edn | |
| # bb conveyor | |
| # - name: Upload Executables | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: executables | |
| # path: project/behave/output |