Skip to content

Update backend

Update backend #1

name: Build backend and push Docker Image
on:
push:
branches:
- dev
paths:
- backend/**
pull_request:
branches:
- dev
paths:
- backend/**
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install Dart Frog
run: dart pub global activate dart_frog_cli
- name: Create Dev Build
run: dart_frog build
- name: Change Directory to build folder
run: cd build/
# - name: Overwrite file
# uses: "DamianReeves/write-file-action@master"
# with:
# path: nixpacks.toml
# write-mode: overwrite
# contents: |
# [phases.setup]
# nixpkgsArchive = 'bc901a14315f03cb02d5be6d7e4c8075cd0fe36c'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: build/
push: true
tags: dungngminh/server:latest