Add docker compose #114
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: Docker Image CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: development | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push AccessGovernanceBot | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./deployments/access_governance_bot/Dockerfile | |
build-args: | | |
ENVIRONMENT=${{ vars.ENVIRONMENT }} | |
INITIAL_SEEDERS=${{ vars.INITIAL_SEEDERS }} | |
VOTING_DURATION_DAYS=${{ vars.VOTING_DURATION_DAYS }} | |
LOKI_URL=${{ secrets.LOKI_URL }} | |
DB_URL=${{ secrets.DB_URL }} | |
TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN=${{ secrets.TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN }} | |
TELEGRAM_VOTE_BOT_TOKEN=${{ secrets.TELEGRAM_VOTE_BOT_TOKEN }} | |
MEMBERS_CHAT_ID=${{ vars.MEMBERS_CHAT_ID }} | |
SEEDERS_CHAT_ID=${{ vars.SEEDERS_CHAT_ID }} | |
DISCORD_INVITE_LINK=${{ secrets.DISCORD_INVITE_LINK }} | |
push: true | |
tags: ghcr.io/beniamiiin/access-governance-system:agb | |
- name: Build and push ProposalStateService | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./deployments/proposal_state_service/Dockerfile | |
build-args: | | |
ENVIRONMENT=${{ vars.ENVIRONMENT }} | |
LOKI_URL=${{ secrets.LOKI_URL }} | |
DB_URL=${{ secrets.DB_URL }} | |
QUORUM=${{ vars.QUORUM }} | |
MAX_REQUIRED_SEEDERS_COUNT=${{ vars.MAX_REQUIRED_SEEDERS_COUNT }} | |
YES_VOTES_TO_OVERCOME_NO=${{ vars.YES_VOTES_TO_OVERCOME_NO }} | |
MIN_YES_VOTES_PERCENTAGE=${{ vars.MIN_YES_VOTES_PERCENTAGE }} | |
MIN_REQUIRED_YES_VOTES=${{ vars.MIN_REQUIRED_YES_VOTES }} | |
TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN=${{ secrets.TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN }} | |
MEMBERS_CHAT_ID=${{ vars.MEMBERS_CHAT_ID }} | |
SEEDERS_CHAT_ID=${{ vars.SEEDERS_CHAT_ID }} | |
push: true | |
tags: ghcr.io/beniamiiin/access-governance-system:pss | |
- name: Build and push TelegramAuthorizationBot | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./deployments/authorization_bot/telegram/Dockerfile | |
build-args: | | |
ENVIRONMENT=${{ vars.ENVIRONMENT }} | |
LOKI_URL=${{ secrets.LOKI_URL }} | |
DB_URL=${{ secrets.DB_URL }} | |
TELEGRAM_AUTHORIZATION_BOT_TOKEN=${{ secrets.TELEGRAM_AUTHORIZATION_BOT_TOKEN }} | |
DISCORD_AUTHORIZATION_BOT_TOKEN=${{ secrets.DISCORD_AUTHORIZATION_BOT_TOKEN }} | |
DISCORD_SERVER_ID=${{ secrets.DISCORD_SERVER_ID }} | |
DISCORD_MEMBER_ROLE_ID=${{ secrets.DISCORD_MEMBER_ROLE_ID }} | |
push: true | |
tags: ghcr.io/beniamiiin/access-governance-system:tab | |
- name: Build and push DiscordAuthorizationBot | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./deployments/authorization_bot/discord/Dockerfile | |
build-args: | | |
ENVIRONMENT=${{ vars.ENVIRONMENT }} | |
LOKI_URL=${{ secrets.LOKI_URL }} | |
DISCORD_AUTHORIZATION_BOT_TOKEN=${{ secrets.DISCORD_AUTHORIZATION_BOT_TOKEN }} | |
push: true | |
tags: ghcr.io/beniamiiin/access-governance-system:dab |