diff --git a/.github/workflows/on-push-server.yaml b/.github/workflows/on-push-server.yaml new file mode 100644 index 00000000..66da9355 --- /dev/null +++ b/.github/workflows/on-push-server.yaml @@ -0,0 +1,42 @@ +name: On Push Server + +on: + push: + branches: + - server + +jobs: + push-docker-image: + runs-on: ubuntu-latest + env: + DOCKER_CLI_EXPERIMENTAL: "enabled" + + steps: + - uses: actions/checkout@v3 + + - name: tag + id: next_tag + run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + with: + install: true + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build & push prem + run: >- + docker buildx build --push + --file Dockerfile + --tag ghcr.io/premai-io/prem-app:latest + --platform linux/arm64,linux/amd64 .