Skip to content

added /deals command to search for deals by keyword (#42) #55

added /deals command to search for deals by keyword (#42)

added /deals command to search for deals by keyword (#42) #55

Workflow file for this run

name: Build and Publish Docker Image
on:
push:
branches:
- 'main'
jobs:
html:
name: Static HTML Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install Dependencies
working-directory: html
run: npm ci --production
- name: Build html
working-directory: html
run: npm run build
- name: Upload HTML artifacts
uses: actions/upload-artifact@v3
with:
name: html
path: "./html/build"
x86_64-unknown-linux-musl:
name: Linux x86_64
runs-on: ubuntu-latest
needs: [html]
steps:
- uses: actions/checkout@v2
- name: Download HTML artifacts
uses: actions/download-artifact@v3
with:
name: html
path: "./html/build"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-musl
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target x86_64-unknown-linux-musl --bins --release
- name: Rename binaries
run: mv target/x86_64-unknown-linux-musl/release/message-queuing message-queuing_amd64 && mv target/x86_64-unknown-linux-musl/release/bot-commands bot-commands_amd64 && mv target/x86_64-unknown-linux-musl/release/bot-consumer bot-consumer_amd64 && mv target/x86_64-unknown-linux-musl/release/webserver webserver_amd64
- name: Upload AMD64 binaries
uses: actions/upload-artifact@v3
with:
name: amd64
path: "*_amd64"
aarch64-unknown-linux-musl:
name: Linux ARM64
runs-on: ubuntu-latest
needs: [html]
steps:
- uses: actions/checkout@v2
- name: Download HTML artifacts
uses: actions/download-artifact@v3
with:
name: html
path: "./html/build"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-unknown-linux-musl
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target aarch64-unknown-linux-musl --bins --release
- name: Rename binaries
run: mv target/aarch64-unknown-linux-musl/release/message-queuing message-queuing_arm64 && mv target/aarch64-unknown-linux-musl/release/bot-commands bot-commands_arm64 && mv target/aarch64-unknown-linux-musl/release/bot-consumer bot-consumer_arm64 && mv target/aarch64-unknown-linux-musl/release/webserver webserver_arm64
- name: Upload ARM64 binaries
uses: actions/upload-artifact@v3
with:
name: arm64
path: "*_arm64"
docker:
name: Docker Image
runs-on: ubuntu-latest
needs: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download AMD64 binaries
uses: actions/download-artifact@v3
with:
name: amd64
- name: Download ARM64 binaries
uses: actions/download-artifact@v3
with:
name: arm64
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: marnixjanssen/telgram-pepperbot:latest
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [docker]
steps:
- name: Deploy to Kubernetes
shell: bash
env:
DEPLOY_URL: ${{ secrets.DEPLOY_URL }}
DEPLOY_NAMESPACE: ${{ secrets.DEPLOY_NAMESPACE }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
curl --header "Authorization: Bearer $DEPLOY_TOKEN" "$DEPLOY_URL/deployment/$DEPLOY_NAMESPACE"