File tree 1 file changed +6
-2
lines changed 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 25
25
uses : actions/checkout@v4
26
26
with :
27
27
ref : main
28
+ fetch-depth : 0
28
29
29
30
- name : Set up Nushell
30
31
uses : hustcer/setup-nu@v3
@@ -47,11 +48,14 @@ jobs:
47
48
- name : " Set tag & labels for ${{ github.ref }}"
48
49
shell : nu {0}
49
50
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
52
51
let tagName = http get https://api.github.com/repos/nushell/nushell/releases
53
52
| 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
54
57
$'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
55
59
56
60
- name : Build and Push Debian Image
57
61
uses : docker/build-push-action@v6
You can’t perform that action at this time.
0 commit comments