Skip to content

feat: Adding support for embeds and referenced messages in delete log… #13

feat: Adding support for embeds and referenced messages in delete log…

feat: Adding support for embeds and referenced messages in delete log… #13

Workflow file for this run

name: Staging CI
on:
push:
branches:
- staging
jobs:
lint_helm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint Helm
run: helm lint ./charts/discord-bot
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: flybywiresim/discord-bot
tag-sha: true
tag-latest: false
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=flybywiresim/discord-bot:staging
cache-to: type=inline
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
deploy_staging:
runs-on: ubuntu-latest
needs: [build_and_push, lint_helm]
env:
NAMESPACE: fbw-bot-staging
RELEASE_NAME: discord-bot
VALUES_FILE: ./charts/discord-bot/environments/staging.yaml
BOT_SECRET: ${{ secrets.STAGING_BOT_SECRET }}
METAR_TOKEN: ${{ secrets.METAR_TOKEN }}
STATION_TOKEN: ${{ secrets.STATION_TOKEN }}
WOLFRAMALPHA_TOKEN: ${{ secrets.WOLFRAMALPHA_TOKEN }}
MONGODB_URL: ${{ secrets.MONGODB_URL }}
BAN_APPEAL_URL: ${{ secrets.BAN_APPEAL_URL }}
IMAGE_BASE_URL: ${{ secrets.IMAGE_BASE_URL_STAGING }}
TAF_TOKEN: ${{ secrets.TAF_TOKEN }}
steps:
- uses: actions/checkout@v1
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }}
- name: Deploy
run: |
TAG=$(echo $GITHUB_SHA | head -c7) &&
helm upgrade --install --namespace ${NAMESPACE} \
--set image.tag=sha-${TAG} \
--set bot.secret=${BOT_SECRET} \
--set bot.metarToken=${METAR_TOKEN} \
--set bot.stationToken=${STATION_TOKEN} \
--set bot.wolframAlphaToken=${WOLFRAMALPHA_TOKEN} \
--set bot.mongodbUrl=${MONGODB_URL} \
--set bot.banAppealUrl=${BAN_APPEAL_URL} \
--set bot.imageBaseUrl=${IMAGE_BASE_URL} \
--set bot.tafToken=${TAF_TOKEN} \
-f ./charts/discord-bot/values.yaml -f ${VALUES_FILE} ${RELEASE_NAME} ./charts/discord-bot