diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index d4402ec..e99b52e 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1,50 +1,22 @@ +name: Build and push image + on: push: - pull_request: - workflow_dispatch: - schedule: - - cron: '0 0 * * 4' - -name: CI + branches: [main] jobs: - docker: - name: Docker + deploy: + runs-on: self-hosted defaults: run: - shell: bash --noprofile --norc -exo pipefail {0} - strategy: - fail-fast: false - matrix: - docker_version: - - 18.09 - - 19.03 - - "20.10" - - "latest" - docker_channel: - - stable - - test - - nightly - os: - - ubuntu-latest - runs-on: ${{ matrix.os }} - # timeout-minutes: 20 + working-directory: /repo steps: - - name: setup Docker - uses: ./ - # uses: docker-practice/actions-setup-docker@master - with: - docker_version: ${{ matrix.docker_version }} - docker_channel: ${{ matrix.docker_channel }} - - name: Setup tmate session - uses: mxschmitt/action-tmate@master - if: ${{ failure() }} - timeout-minutes: 60 - - name: Test + - name: Set git remote if not already set + run: git remote -v | grep -w gitea || git remote add gitea "./gitea/git/repositories/${GITHUB_REPOSITORY,,}.git" + + - name: Checkout repo + run: git pull gitea main + + - name: Deploy run: | - # set -x - docker version - cat /etc/docker/daemon.json || true - cat /Users/runner/.docker/daemon.json || true - docker buildx version || true - docker buildx ls || true + docker build -t rynomarree/self-hosted-deployment:latest .