From eaa464b8c25155a19590b8bc615cb5615c6d623e Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Sat, 13 Jan 2024 10:19:50 -0600 Subject: [PATCH] WIP --- .github/workflows/build-images.yml | 148 ++++++++++++++--------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index d955f6f7..712e6164 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -27,7 +27,7 @@ jobs: timeout-minutes: 5 # https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs outputs: - version: ${{ steps.git-describe-semver-approach1.outputs.version }} + version: ${{ steps.git-describe-semver-approach5.outputs.version }} steps: - name: Print Docker version @@ -53,74 +53,74 @@ jobs: # https://github.com/choffmeister/git-describe-semver/issues/8 # https://github.com/choffmeister/git-describe-semver/blob/v0.3.11/action.yaml # https://github.com/choffmeister/git-describe-semver/blob/v0.4.0/action.yaml - - name: Record semantic version using git-describe-semver (approach 1) - id: git-describe-semver-approach1 - uses: choffmeister/git-describe-semver@v0.4.0 # version of action - with: - fallback: v0.0.0 - drop-prefix: false - prerelease-prefix: dev - prerelease-suffix: "" - prerelease-timestamped: false - version: v0.3.11 # version of tool + # - name: Record semantic version using git-describe-semver (approach 1) + # id: git-describe-semver-approach1 + # uses: choffmeister/git-describe-semver@v0.4.0 # version of action + # with: + # fallback: v0.0.0 + # drop-prefix: false + # prerelease-prefix: dev + # prerelease-suffix: "" + # prerelease-timestamped: false + # version: v0.3.11 # version of tool # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-setting-an-output-parameter # https://stackoverflow.com/questions/59954185/github-action-split-long-command-into-multiple-lines # https://github.com/actions/runner/issues/808 # https://github.com/moby/moby/issues/37366 - - name: Record semantic version using git-describe-semver (approach 2) - id: git-describe-semver-approach2 - run: | - echo -n "version=" >> "$GITHUB_OUTPUT" - docker container run \ - --platform linux/amd64 \ - --rm \ - -t \ - -v $PWD:/code \ - -w /code \ - ghcr.io/choffmeister/git-describe-semver:0.3.11 \ - --fallback 'v0.0.0' \ - --drop-prefix=false \ - --prerelease-prefix 'dev' \ - --prerelease-suffix "" \ - --prerelease-timestamped=false \ - | tr -d '\r' >> "$GITHUB_OUTPUT" + # - name: Record semantic version using git-describe-semver (approach 2) + # id: git-describe-semver-approach2 + # run: | + # echo -n "version=" >> "$GITHUB_OUTPUT" + # docker container run \ + # --platform linux/amd64 \ + # --rm \ + # -t \ + # -v $PWD:/code \ + # -w /code \ + # ghcr.io/choffmeister/git-describe-semver:0.3.11 \ + # --fallback 'v0.0.0' \ + # --drop-prefix=false \ + # --prerelease-prefix 'dev' \ + # --prerelease-suffix "" \ + # --prerelease-timestamped=false \ + # | tr -d '\r' >> "$GITHUB_OUTPUT" # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-setting-an-output-parameter # https://stackoverflow.com/questions/59954185/github-action-split-long-command-into-multiple-lines # https://github.com/actions/runner/issues/808 # https://github.com/moby/moby/issues/37366 - - name: Record semantic version using git-describe-semver (approach 3) - id: git-describe-semver-approach3 - run: >- - echo "version=$( - docker container run - --platform linux/amd64 - --rm - -t - -v $PWD:/code - -w /code - ghcr.io/choffmeister/git-describe-semver:0.3.11 - --fallback 'v0.0.0' - --drop-prefix=false - --prerelease-prefix 'dev' - --prerelease-suffix "" - --prerelease-timestamped=false - | tr -d '\r' - )" >> "$GITHUB_OUTPUT" - - - name: Record semantic version using git-describe-semver (approach 4) - id: git-describe-semver-approach4 - run: | - go install github.com/choffmeister/git-describe-semver@v0.3.11 - echo -n "version=" >> "$GITHUB_OUTPUT" - $HOME/go/bin/git-describe-semver \ - --fallback 'v0.0.0' \ - --drop-prefix=false \ - --prerelease-prefix 'dev' \ - --prerelease-suffix "" \ - --prerelease-timestamped=false \ - | tr -d '\r' >> "$GITHUB_OUTPUT" + # - name: Record semantic version using git-describe-semver (approach 3) + # id: git-describe-semver-approach3 + # run: >- + # echo "version=$( + # docker container run + # --platform linux/amd64 + # --rm + # -t + # -v $PWD:/code + # -w /code + # ghcr.io/choffmeister/git-describe-semver:0.3.11 + # --fallback 'v0.0.0' + # --drop-prefix=false + # --prerelease-prefix 'dev' + # --prerelease-suffix "" + # --prerelease-timestamped=false + # | tr -d '\r' + # )" >> "$GITHUB_OUTPUT" + + # - name: Record semantic version using git-describe-semver (approach 4) + # id: git-describe-semver-approach4 + # run: | + # go install github.com/choffmeister/git-describe-semver@v0.3.11 + # echo -n "version=" >> "$GITHUB_OUTPUT" + # $HOME/go/bin/git-describe-semver \ + # --fallback 'v0.0.0' \ + # --drop-prefix=false \ + # --prerelease-prefix 'dev' \ + # --prerelease-suffix "" \ + # --prerelease-timestamped=false \ + # | tr -d '\r' >> "$GITHUB_OUTPUT" - name: Record semantic version using git-describe-semver (approach 5) uses: docker://ghcr.io/choffmeister/git-describe-semver:0.3.11 @@ -135,21 +135,21 @@ jobs: --format="version=" $GITHUB_OUTPUT - - name: Print semantic version generated by git-describe-semver-approach1 - run: | - echo "${{ steps.git-describe-semver-approach1.outputs.version }}" - - - name: Print semantic version generated by git-describe-semver-approach2 - run: | - echo "${{ steps.git-describe-semver-approach2.outputs.version }}" - - - name: Print semantic version generated by git-describe-semver-approach3 - run: | - echo "${{ steps.git-describe-semver-approach3.outputs.version }}" - - - name: Print semantic version generated by git-describe-semver-approach4 - run: | - echo "${{ steps.git-describe-semver-approach4.outputs.version }}" +# - name: Print semantic version generated by git-describe-semver-approach1 +# run: | +# echo "${{ steps.git-describe-semver-approach1.outputs.version }}" +# +# - name: Print semantic version generated by git-describe-semver-approach2 +# run: | +# echo "${{ steps.git-describe-semver-approach2.outputs.version }}" +# +# - name: Print semantic version generated by git-describe-semver-approach3 +# run: | +# echo "${{ steps.git-describe-semver-approach3.outputs.version }}" +# +# - name: Print semantic version generated by git-describe-semver-approach4 +# run: | +# echo "${{ steps.git-describe-semver-approach4.outputs.version }}" - name: Print semantic version generated by git-describe-semver-approach5 run: |