diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..98ac6c0 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,35 @@ +name: Docker Image Builder + +on: + push: + branches: [ "master" ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push container image + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64 + push: true + tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ github.sha }} diff --git a/compose.yml b/compose.yml deleted file mode 100644 index fe19f48..0000000 --- a/compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -services: - bot: - build: . - env_file: - - ./env/pythonas.env - depends_on: - - db - - db: - image: postgres:13 - env_file: - - ./env/pythonas.env - volumes: - - postgres_data:/var/lib/postgresql/data - -volumes: - postgres_data: -