Skip to content

v2.0.0-beta.7

v2.0.0-beta.7 #12

Workflow file for this run

name: Rust CI/CD
on:
release:
types: [ published ]
env:
CARGO_TERM_COLOR: always
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Azure container registry
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Get version from github ref
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ secrets.REGISTRY_LOGIN_SERVER }}/joel-bot:${{ steps.get_version.outputs.VERSION }}
deploy:
runs-on: ubuntu-latest
needs:
- build_and_push
steps:
- name: Get version from github ref
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Login via Azure CLI
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy joel-bot
uses: azure/webapps-deploy@v3
with:
app-name: joel-bot
images: ${{ secrets.REGISTRY_LOGIN_SERVER }}/joel-bot:${{ steps.get_version.outputs.VERSION }}
- name: Azure logout
run: |
az logout