From f2625b2ec0411f647fc5ee0861e50a550bdf6143 Mon Sep 17 00:00:00 2001 From: Chicory Date: Mon, 29 Jul 2024 20:26:53 +0300 Subject: [PATCH] Workflow setup --- .gitea/workflows/deploy.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..27f84eb --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,34 @@ +name: Push to repository +on: [push] + +jobs: + Push_to_repository: + runs-on: ubuntu-act-latest + steps: + + - name: Set up Docker Build. + uses: docker/setup-buildx-action@v3 + + - name: Build image. + uses: docker/build-push-action@v6 + with: + load: true + tags: ${{ vars.LATEST_TAG }} + + - name: DockerHub login. + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Test. + run: | + docker run --rm ${{ env.LATEST_TAG }} php -v + docker run --rm ${{ env.LATEST_TAG }} php -m + docker run --rm ${{ env.LATEST_TAG }} composer -v + + - name: Deploy + uses: docker/build-push-action@v6 + with: + push: true + tags: ${{ vars.LATEST_TAG }} \ No newline at end of file