Skip to content

Commit

Permalink
Add github action for rust build
Browse files Browse the repository at this point in the history
  • Loading branch information
slackspace-io committed Apr 3, 2024
1 parent 440291e commit ad49598
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/slackwatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Push Rust Docker Image

on:
push:
branches:
- main
- dioxus-1
paths:
- 'backend/**'
- '.github/workflows/backend.yml'

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to GitHub Container Registry
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: ghcr.io/slackspace-io/slackwatch:latest,ghcr.io/slackspace-io/slackwatch:dev,ghcr.io/slackspace-io/slackwatch:${{ github.sha }}

0 comments on commit ad49598

Please sign in to comment.