Skip to content

bump go version to 1.23.6 #219

bump go version to 1.23.6

bump go version to 1.23.6 #219

Workflow file for this run

name: build
on:
push:
branches: ["*"]
workflow_dispatch:
inputs:
version:
description: "Version to build, e.g. 0.1.0"
type: string
required: false
env:
PKG_NAME: "vault-plugin-database-oracle"
jobs:
cve-check:
runs-on: ubuntu-latest
steps:
- name: Check OSV
id: osv-check
run: |
test $(curl -XPOST https://api.osv.dev/v1/query -d '{"package":{"name":"oracle-instantclient19.23-basic"}, "version": "19.23"}') = "{}"
- name: Check NIST NVD
id: nvd-check
run: |
test $(curl -sSL 'https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=cpe:2.3:a:oracle:instant_client:19.23:*' | jq .totalResults) -eq 0
get-product-version:
runs-on: ubuntu-latest
outputs:
product-version: ${{ steps.get-product-version.outputs.product-version }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: get product version
id: get-product-version
run: |
VERSION="${{ github.event.inputs.version || '0.0.0-dev' }}"
echo "Using version ${VERSION}"
echo "product-version=${VERSION}" >> "$GITHUB_OUTPUT"
generate-metadata-file:
needs: get-product-version
runs-on: ubuntu-latest
outputs:
filepath: ${{ steps.generate-metadata-file.outputs.filepath }}
steps:
- name: 'Checkout directory'
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Generate metadata file
id: generate-metadata-file
uses: hashicorp/actions-generate-metadata@v1
with:
version: ${{ needs.get-product-version.outputs.product-version }}
product: ${{ env.PKG_NAME }}
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: metadata.json
path: ${{ steps.generate-metadata-file.outputs.filepath }}
build:
needs:
- get-product-version
runs-on: ubuntu-latest
strategy:
matrix:
arch: ["amd64"]
fail-fast: true
name: Go linux ${{ matrix.arch }} build
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: .go-version
cache: true
- name: Build
env:
GOOS: "linux"
GOARCH: ${{ matrix.arch }}
VERSION: ${{ needs.get-product-version.outputs.product-version }}
run: |
mkdir out
make build-in-container
zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip pkg/ LICENSE
- name: Upload
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip
path: out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip