Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 authored Nov 28, 2024
1 parent 2930816 commit d3b4d91
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build

on:
push:
branches:
- 'main'
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- 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.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push backend
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile-backend
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/langaracpsc/notion-web-api-backend:latest
- name: Build and push api
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile-api
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/langaracpsc/notion-web-api-fastapi:latest
deployment:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy docker package on LCSC server
uses: fjogeleit/http-request-action@v1
with:
url: 'https://watchtower.langaracs.ca/v1/update'
method: 'GET'
bearerToken: ${{ secrets.WATCHTOWER_HTTP_API_TOKEN }}
timeout: 60000

0 comments on commit d3b4d91

Please sign in to comment.