-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from grafana/chore/fix-gh-actions
[fix] Update git actions
- Loading branch information
Showing
9 changed files
with
24,488 additions
and
7,498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,37 +3,38 @@ name: Release | |
on: | ||
push: | ||
tags: | ||
- v* | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
jobs: | ||
build-on-tag: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 12.xs | ||
uses: actions/setup-node@v1 | ||
- name: Setup environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '12.x' | ||
node-version: '16' | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: yarn lint | ||
- name: Lint files | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: yarn test | ||
run: npm test | ||
|
||
- name: Bundle | ||
run: yarn bundle | ||
run: npm run bundle | ||
|
||
- name: Publish to NPM | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm publish | ||
|
||
- name: Build docker image | ||
run: | | ||
|
@@ -48,3 +49,21 @@ jobs: | |
grafana/har-to-k6:latest | ||
docker push grafana/har-to-k6:$tag | ||
docker push grafana/har-to-k6:latest | ||
create-github-release: | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
needs: publish | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create Release Notes | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
await github.request(`POST /repos/${{ github.repository }}/releases`, { | ||
tag_name: "${{ github.ref }}", | ||
generate_release_notes: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
12.18.0 | ||
v16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM node:12-slim | ||
FROM node:16-slim | ||
|
||
WORKDIR /converter | ||
|
||
COPY . . | ||
|
||
RUN yarn | ||
RUN yarn bundle | ||
RUN npm install | ||
RUN npm run bundle | ||
|
||
ENTRYPOINT ["node", "bin/har-to-k6.js"] |
Oops, something went wrong.