From 30aa25728a68dc89686432d652272dc1c54350ab Mon Sep 17 00:00:00 2001 From: nyakiomaina Date: Fri, 8 Nov 2024 14:26:41 +0300 Subject: [PATCH] add depot build --- .github/workflows/depot.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/depot.yml diff --git a/.github/workflows/depot.yml b/.github/workflows/depot.yml new file mode 100644 index 0000000..21e7aa9 --- /dev/null +++ b/.github/workflows/depot.yml @@ -0,0 +1,47 @@ +name: operator + +on: + push: + branches: + - main + pull_request: + branches: + - '*' + +env: + REGISTRY: ghcr.io + +jobs: + build: + name: Depot Build + runs-on: depot-ubuntu-22.04-4 + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry (GHCR) + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Depot CLI + uses: depot/setup-action@v1 + env: + DEPOT_TOKEN: ${{ secrets.DEPOT_API_TOKEN }} + + - name: Build and Load Docker Image with Depot + run: | + depot build . \ + --project hs0gfs4l0l \ + --file Dockerfile \ + --tag ${{ env.REGISTRY }}/${{ github.repository }}:latest \ + --platform linux/amd64 \ + --build-arg RELEASE=--release \ + --build-arg ARCH=amd64 \ + --build-arg RELEASE_DIR=release \ + --load + env: + DEPOT_TOKEN: ${{ secrets.DEPOT_API_TOKEN }} \ No newline at end of file