Skip to content

Commit

Permalink
Update GitHub Actions workflows (closes #213)
Browse files Browse the repository at this point in the history
  • Loading branch information
adatzer committed Nov 16, 2022
1 parent b694a02 commit aa582fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.17'

Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.17'

Expand All @@ -35,8 +35,8 @@ jobs:
- name: Get tag and sql-runner version information
id: version
run: |
echo ::set-output name=TAG_VERSION::${GITHUB_REF#refs/*/}
echo "##[set-output name=SQL_RUNNER_VERSION;]$(cat VERSION)"
echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "SQL_RUNNER_VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Fail if version mismatch
if: ${{ steps.version.outputs.TAG_VERSION != steps.version.outputs.SQL_RUNNER_VERSION }}
Expand All @@ -51,18 +51,17 @@ jobs:
id: date
run: echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: ncipollo/release-action@v1
with:
tag_name: ${{ github.ref }}
release_name: Version ${{ github.ref }} (${{ env.RELEASE_DATE }})
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.version.outputs.TAG_VERSION }}
name: Version ${{ steps.version.outputs.TAG_VERSION }} (${{ env.RELEASE_DATE }})
draft: false
prerelease: ${{ contains(steps.version.outputs.TAG_VERSION, '-rc') }}

- name: Upload release assets
uses: alexellis/upload-assets@0.2.3
uses: alexellis/upload-assets@0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/golang@master
with:
command: monitor
args: --prune-repeated-subdependencies --project-name=sql-runner
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

0 comments on commit aa582fb

Please sign in to comment.