File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 2525 uses : actions/checkout@v4
2626 with :
2727 ref : main
28+ fetch-depth : 0
2829
2930 - name : Set up Nushell
3031 uses : hustcer/setup-nu@v3
@@ -47,11 +48,14 @@ jobs:
4748 - name : " Set tag & labels for ${{ github.ref }}"
4849 shell : nu {0}
4950 run : |
50- $'BUILD_REF=(git rev-parse --short HEAD)(char nl)' o>> $env.GITHUB_ENV
51- $'BUILD_DATE=(date now | format date %Y-%m-%dT%H:%M:%SZ)(char nl)' o>> $env.GITHUB_ENV
5251 let tagName = http get https://api.github.com/repos/nushell/nushell/releases
5352 | sort-by -r created_at | select tag_name | get tag_name.0
53+ git remote set-url origin https://github.com/nushell/nushell.git
54+ git fetch origin --tags
55+ let SHA = git rev-list -n 1 $tagName | str substring 0..7
56+ $'BUILD_REF=($SHA)(char nl)' o>> $env.GITHUB_ENV
5457 $'NU_VERSION=($tagName)(char nl)' o>> $env.GITHUB_ENV
58+ $'BUILD_DATE=(date now | format date %Y-%m-%dT%H:%M:%SZ)(char nl)' o>> $env.GITHUB_ENV
5559
5660 - name : Build and Push Debian Image
5761 uses : docker/build-push-action@v6
You can’t perform that action at this time.
0 commit comments