Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

backported fix for matched map from zfw #32

backported fix for matched map from zfw

backported fix for matched map from zfw #32

Workflow file for this run

---
name: release
on:
pull_request:
types: [closed]
jobs:
build_release:
runs-on: [self-hosted, linux, X64]
outputs:
version: ${{ steps.version.outputs.version }}
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install EBPF Packages
run: |
sudo apt-get update -qq
sudo apt-get upgrade -yqq
sudo apt-get install -y jq gcc clang libc6-dev-i386 libbpfcc-dev libbpf-dev
- name: Compile Object files from Source
run: |
clang -g -O2 -Wall -Wextra -target bpf -c -o files/objects/tproxy_splicer.o src/tproxy_splicer.c
clang -O2 -Wall -Wextra -o files/objects/map_update src/map_update.c
- name: Tar Object File
run: |
tar -cvzf tproxy_splicer.tar.gz files/objects/tproxy_splicer.o
- name: Get version
run: echo "version=`files/bin/zfw -V`" >> $GITHUB_OUTPUT
id: version
- uses: actions/upload-artifact@v3
with:
name: archive
path: |
./tproxy_splicer.tar.gz
create_release:
runs-on: ubuntu-22.04
needs:
- build_release
strategy:
matrix:
goos: [linux]
steps:
- name: Create release
uses: ncipollo/release-action@v1.12.0
id: release
with:
draft: false
prerelease: false
tag: v${{ needs.build_release.outputs.version }}
env:
GITHUB_TOKEN: ${{ github.token }}
deploy_package:
runs-on: ubuntu-22.04
needs:
- build_release
- create_release
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps:
- uses: actions/download-artifact@v3
with:
name: archive
- name: Upload built deb artifacts
uses: svenstaro/upload-release-action@2.5.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
file: ./tproxy_splicer.tar.gz
release_name: v${{ needs.build_release.outputs.version }}
tag: v${{ needs.build_release.outputs.version }}