Add Docker build workflow
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 3m27s
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 3m27s
This commit is contained in:
29
.gitea/workflows/docker-build.yml
Normal file
29
.gitea/workflows/docker-build.yml
Normal file
@@ -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 }}
|
@@ -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