Skip to content

github sha pass to docker #20

github sha pass to docker

github sha pass to docker #20

Workflow file for this run

name: Deploy
on:
push:
branches: ["master"]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build -t rustapi --build-arg GITHUB_SHA=$GITHUB_SHA .
- name: Run image
run: |
docker stop rustapi || true
docker rm rustapi || true
docker run -d -p 2004:2004 -v sqlite:/sqlite -e DBPATH=/sqlite/sqlite.db --name rustapi --restart always rustapi