Skip to content

Commit 9d0c3c4

Browse files
committed
ci: roll back changes from ci main
1 parent c61713c commit 9d0c3c4

File tree

3 files changed

+15
-33
lines changed

3 files changed

+15
-33
lines changed

.github/workflows/ci-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup Node.js
2020
uses: actions/setup-node@v2
2121
with:
22-
node-version: '20'
22+
node-version: '14'
2323

2424
- name: Install tfx-cli and typescript
2525
run: |

.github/workflows/main.yml

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,58 +32,40 @@ jobs:
3232
npm install -g typescript
3333
3434
- name: Login to Azure DevOps
35-
uses: azure/login@v2
35+
uses: azure/login@v1
3636
with:
3737
client-id: ${{ secrets.AZURE_APPLICATION_CLIENT_ID }}
3838
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
3939
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4040

4141
- name: Get Azure DevOps access token
42-
id: devops_token
42+
id: get_token
4343
run: |
44-
TOKEN="$(az account get-access-token --resource "${{ secrets.AZURE_MARKETPLACE_ACCESS_SCOPE }}" --query accessToken -o tsv)"
45-
echo "::add-mask::$TOKEN"
46-
echo "azure_devops_access_token=$TOKEN" >> "$GITHUB_OUTPUT"
44+
echo "AZURE_DEVOPS_ACCESS_TOKEN=$(az account get-access-token --resource ${{ secrets.AZURE_MARKETPLACE_ACCESS_SCOPE }} --query accessToken -o tsv)" >> $GITHUB_ENV
4745
4846
- name: Build release
4947
run: |
5048
make build
5149
5250
- name: Increment version
53-
id: bump
5451
run: |
5552
chmod +x ./bump_version.sh
56-
NEW_VERSION="$(./bump_version.sh)"
57-
if [[ -z "$NEW_VERSION" ]]; then
58-
echo "Version bump script returned empty version" >&2
59-
exit 1
60-
fi
61-
echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
53+
NEW_VERSION=$(./bump_version.sh)
54+
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
6255
6356
- name: Publish release
6457
env:
65-
AZURE_DEVOPS_ACCESS_TOKEN: ${{ steps.devops_token.outputs.azure_devops_access_token }}
58+
AZURE_DEVOPS_ACCESS_TOKEN: ${{ env.AZURE_DEVOPS_ACCESS_TOKEN }}
6659
run: |
6760
make publish-release
6861
6962
- name: Commit version increment
7063
run: |
7164
git config --local user.email "action@github.com"
7265
git config --local user.name "GitHub Action"
73-
74-
git add ./sysdig-cli-scan-task/task.json ./VERSION ./vss-extension.json
75-
if git diff --cached --quiet; then
76-
echo "No changes to commit."
77-
exit 0
78-
fi
79-
80-
VERSION="${{ steps.bump.outputs.new_version }}"
81-
git commit -m "chore: bump version to ${VERSION}"
82-
if git tag -l "${VERSION}" | grep -q "^${VERSION}$"; then
83-
echo "Tag ${VERSION} already exists, skipping tag creation."
84-
else
85-
git tag -a "${VERSION}" -m "Release ${VERSION}"
86-
fi
87-
88-
git push origin HEAD
89-
git push origin "${VERSION}"
66+
git add ./sysdig-cli-scan-task/task.json
67+
git add ./VERSION
68+
git add ./vss-extension.json
69+
git commit -m "Increment version to ${{ env.NEW_VERSION }}"
70+
git tag ${{ env.NEW_VERSION }}
71+
git push origin HEAD --tags

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ AZURE_DEVOPS_ACCESS_TOKEN ?=
66
all: build
77

88
build:
9-
npm ci
10-
cd $(TYPESCRIPT_SOURCE) && npm ci && tsc
9+
npm install
10+
cd $(TYPESCRIPT_SOURCE) && npm install && tsc
1111

1212
publish-local: build
1313
tfx extension publish \

0 commit comments

Comments
 (0)