fix: add aliases back to weather command (#525) #315
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Production CI | |
on: | |
push: | |
branches: | |
- master | |
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:master | |
cache-to: type=inline | |
push: true | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
deploy_production: | |
runs-on: ubuntu-latest | |
needs: [build_and_push, lint_helm] | |
env: | |
NAMESPACE: fbw-bot-prod | |
RELEASE_NAME: discord-bot | |
VALUES_FILE: ./charts/discord-bot/environments/production.yaml | |
BOT_SECRET: ${{ secrets.PROD_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_PROD }} | |
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 |