You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/agent-ci.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,8 @@ jobs:
77
77
steps:
78
78
- name: Checkout repository
79
79
uses: actions/checkout@v4
80
+
- name: Fetch all tags
81
+
run: git fetch --tags --force
80
82
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
81
83
- name: Log in to the Container registry
82
84
uses: docker/login-action@v3
@@ -104,7 +106,7 @@ jobs:
104
106
case ${{ github.ref_type }} in
105
107
branch)
106
108
# The last tag + current git sha
107
-
export AGENT_VERSION=$(git tag --list 'agent*' --sort=-v:refname | head -n 1 | cut -d/ -f2 || echo "0.0.0")+${GIT_SHA}
109
+
export AGENT_VERSION=$(git tag --list 'agent*' --sort=-v:refname | head -n 1 | cut -d/ -f2)+${GIT_SHA}
Copy file name to clipboardExpand all lines: .github/workflows/operator-ci.yaml
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,8 @@ jobs:
119
119
steps:
120
120
- name: Checkout repository
121
121
uses: actions/checkout@v4
122
-
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
122
+
- name: Fetch all tags
123
+
run: git fetch --tags --force
123
124
- name: Log in to the Container registry
124
125
uses: docker/login-action@v3
125
126
with:
@@ -148,7 +149,7 @@ jobs:
148
149
case ${{ github.ref_type }} in
149
150
branch)
150
151
# The last tag + current git sha
151
-
export OPERATOR_VERSION=$(git tag --list 'operator*' --sort=-v:refname | head -n 1 | cut -d/ -f2 || echo "0.0.0")+${GIT_SHA}
152
+
export OPERATOR_VERSION=$(git tag --list 'operator*' --sort=-v:refname | head -n 1 | cut -d/ -f2")+${GIT_SHA}
0 commit comments