Skip to content

Add header for caching key (#3) #3

Add header for caching key (#3)

Add header for caching key (#3) #3

Workflow file for this run

name: release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'
cache: false
- name: Checkout
uses: actions/checkout@v4
- name: Golangci Lint
uses: golangci/golangci-lint-action@v4
- name: Run tests
run: go test -race
- name: Build project
run: |
docker run --rm -v "$PWD:/app" -w /app krakend/builder:2.6.2 go build -buildmode=plugin -o krakend-http-cache.so .
docker run --rm -v "$PWD/krakend-http-cache.so:/app/krakend-http-cache.so" -w /app devopsfaith/krakend:2.6.2 krakend test-plugin -sc krakend-http-cache.so
zip ./krakend-http-cache.zip ./krakend-http-cache.so
- name: Bump version and push tag
id: bump_tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.JENKSY_GITHUB_TOKEN }}
WITH_V: true
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.JENKSY_GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump_tag.outputs.new_tag }}
release_name: Release ${{ steps.bump_tag.outputs.new_tag }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.JENKSY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./krakend-http-cache.zip
asset_name: krakend-http-cache.zip
asset_content_type: application/zip