Add Docker build workflow
This commit is contained in:
1 parent
8dd38e7cde
commit
a336d9f97e
2 files changed
+30
-1
No files matched your search
@@ -0,0 +1,29 @@
|
|||||||
|
name: Docker Build and Push
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Log in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ vars.REGISTRY }}
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ vars.REGISTRY }}/${{ vars.IMAGE_NAME }}:latest
|
||||||
|
${{ vars.REGISTRY }}/${{ vars.IMAGE_NAME }}:${{ github.sha }}
|
||||||
+1
-1
@@ -24,7 +24,7 @@ RUN useradd -m bot
|
|||||||
USER bot
|
USER bot
|
||||||
|
|
||||||
# Create directories for persistent storage and modify permissions
|
# Create directories for persistent storage and modify permissions
|
||||||
RUN chown -R bot:bot /app
|
RUN chown -R bot:bot /app && chmod -R 777 /app
|
||||||
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
||||||
RUN mkdir -p /app/embed && chmod -R 777 /app/embed
|
RUN mkdir -p /app/embed && chmod -R 777 /app/embed
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user