Skip to content

feat(monitor): add zkevm batch counters (#373) #192

feat(monitor): add zkevm batch counters (#373)

feat(monitor): add zkevm batch counters (#373) #192

Workflow file for this run

name: "Build Pipeline (Debian)"
on:
push:
branches: [main]
jobs:
build-pipeline-apt:
name: Build and upload APT package
permissions:
contents: "write"
id-token: "write"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
- name: Building for amd64
run: make build
- name: Making directory structure
run: mkdir -p packaging/deb/polycli/usr/bin
- name: Copying necessary files
run: cp -rp out/polycli packaging/deb/polycli/usr/bin/
- name: Copying control file
run: |
VERSION="0-${{ github.sha }}"
cp -rp packaging/templates/package_scripts/control packaging/deb/polycli/DEBIAN/control
sed -i "s/^Version: .*/Version: $VERSION/" packaging/deb/polycli/DEBIAN/control
- name: Creating package for binary for polycli ${{ env.ARCH }}
run: cp -rp packaging/deb/polycli packaging/deb/polycli-${{ env.GIT_TAG }}-${{ env.ARCH }}-${{ github.sha }}
env:
ARCH: amd64
- name: Running package build
run: dpkg-deb --build --root-owner-group packaging/deb/polycli-${{ env.GIT_TAG }}-${{ env.ARCH }}-${{ github.sha }}
env:
ARCH: amd64
- name: Removing the polycli binary
run: rm -rf packaging/deb/polycli/usr/bin/polycli
#######################################
- name: Google Auth
id: auth
uses: google-github-actions/auth@v2
with:
token_format: "access_token"
workload_identity_provider: "${{ secrets.WIF_PROVIDER }}" # this was hard to find: WIP --> Expand pool --> Click pencil icon
service_account: "${{ secrets.WIF_SERVICE_ACCOUNT }}"
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Check pwd
run: pwd
- name: Check files
run: ls -ltr packaging/deb/ | grep polycli
- id: gcloud
name: gcloud
run: |-
gcloud config set artifacts/repository ${{ secrets.APT_REPOSITORY }}
gcloud config set artifacts/location ${{ vars.GAR_LOCATION }}
gcloud config set project ${{ vars.PROJECT_ID }}
gcloud artifacts apt upload ${{ secrets.APT_REPOSITORY }} --source=packaging/deb/polycli-${{ env.GIT_TAG }}-${{ env.ARCH }}-${{ github.sha }}.deb
env:
ARCH: amd64