diff --git a/.github/workflows/gitea-local.yaml b/.github/workflows/gitea-local.yaml new file mode 100644 index 0000000..9702cdb --- /dev/null +++ b/.github/workflows/gitea-local.yaml @@ -0,0 +1,37 @@ +name: local-build-dev + +# Intended for local network use. +# Remote access is possible if the host has a public IP address. + +on: + workflow_dispatch: + +env: + REGISTRY: ${{ vars.CONTAINER_REGISTRY }} + REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} + +jobs: + local-build-dev: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ env.REGISTRY_USERNAME }} + password: ${{ env.REGISTRY_PASSWORD }} + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + config-inline: | + [registry."${{ env.REGISTRY }}"] + ca=["/etc/ssl/certs/ca-certificates.crt"] + - name: Build and Push Docker Image + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + tags: ${{ env.REGISTRY }}/chamomind/jws-backend:latest + push: true diff --git a/.github/workflows/local-build-release.yaml b/.github/workflows/local-build-release.yaml deleted file mode 100644 index 879b6c6..0000000 --- a/.github/workflows/local-build-release.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: local-build-release - -# Intended for local network use. -# Remote access is possible if the host has a public IP address. - -on: - workflow_dispatch: - -env: - REGISTRY: ${{ vars.DOCKER_REGISTRY }} - -jobs: - local-build-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - config-inline: | - [registry."${{ env.REGISTRY }}"] - http = true - insecure = true - - name: Build and Push Docker Image - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/amd64 - push: true - tags: ${{ env.REGISTRY }}/jws/jws-backend:latest - allow: security.insecure diff --git a/.github/workflows/local-release-demo.yaml b/.github/workflows/local-release-demo.yaml deleted file mode 100644 index 90dc7be..0000000 --- a/.github/workflows/local-release-demo.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: local-release-demo - -# Intended for local network use. -# Remote access is possible if the host has a public IP address. - -on: - workflow_dispatch: - -jobs: - local-release-demo: - runs-on: ubuntu-latest - steps: - - name: Remote deploy internal chamomind server - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd ~/repositories/jws-backend - git pull - docker compose up -d --build - sleep 1 - docker compose logs -n 100 diff --git a/.github/workflows/local-release-dev.yaml b/.github/workflows/local-release-dev.yaml deleted file mode 100644 index b811764..0000000 --- a/.github/workflows/local-release-dev.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: local-release-dev - -# Intended for local network use. -# Remote access is possible if the host has a public IP address. - -on: - workflow_dispatch: - -jobs: - local-release-dev: - runs-on: ubuntu-latest - steps: - - name: Remote deploy internal chamomind server - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd ~/repositories/jws-backend - git pull - docker compose up -d --build - sleep 1 - docker compose logs -n 100