From d6ad9c6586d14d33943d0aa857d3fd90b862eaf0 Mon Sep 17 00:00:00 2001 From: Ashraf Fouda Date: Tue, 5 Nov 2024 16:33:46 +0200 Subject: [PATCH] adds github action to build update-worker Signed-off-by: Ashraf Fouda --- .../workflows/zos-update-worker-release.yml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/zos-update-worker-release.yml diff --git a/.github/workflows/zos-update-worker-release.yml b/.github/workflows/zos-update-worker-release.yml new file mode 100644 index 000000000..dd6386cd3 --- /dev/null +++ b/.github/workflows/zos-update-worker-release.yml @@ -0,0 +1,43 @@ +name: Update Worker Release + +defaults: + run: + working-directory: tools/zos-update-worker + +on: + push: + tags: + - "v*" + +jobs: + zos-update-worker: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Install GO + uses: actions/setup-go@v3 + with: + go-version: 1.19 + + - name: Build zos update worker + run: | + make build + + - name: Get release + id: get_release + uses: bruceadams/get-release@v1.2.3 + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Upload Release Asset for zos update worker + id: upload-release-asset-worker + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: tools/zos-update-worker/bin/zos-update-worker + asset_name: zos-update-worker + asset_content_type: application/x-pie-executable