Update Docker Images #27
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: Update Docker Images | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '50 6 * * 0-6' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
AWS_REGION: us-east-1 | |
jobs: | |
generate-docker-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push mintterd | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: backend/cmd/mintterd/Dockerfile | |
tags: mintter/mintterd:latest | |
- name: Build and push nextjs | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: frontend/apps/site/Dockerfile | |
tags: mintter/sitegw:latest | |
- name: Build and push monitord | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: backend/cmd/monitord/Dockerfile | |
tags: mintter/monitord:latest | |
- name: Build and push gateway | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: backend/cmd/minttergw/Dockerfile | |
tags: mintter/minttergw:latest | |
- name: Build and push relay | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: backend/cmd/relayd/Dockerfile | |
tags: mintter/relayd:latest | |
push-deployment-scripts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Upload scripts | |
run: aws s3 cp ./*.sh s3://minttersite/ | |
- name: Upload docker compose | |
run: aws s3 cp ./docker-compose.yml s3://minttersite/ |