diff --git a/.gitea/workflows/deployStaging.yml b/.gitea/workflows/deployStaging.yml index 88de5f30..fc6cf5ac 100644 --- a/.gitea/workflows/deployStaging.yml +++ b/.gitea/workflows/deployStaging.yml @@ -7,20 +7,26 @@ on: - 'staging' jobs: - CreateImage: - runs-on: [skeris] - uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p - with: - runner: skeris - secrets: - REGISTRY_USER: ${{ secrets.REGISTRY_USER }} - REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} + # CreateImage: + # runs-on: [skeris] + # uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p + # with: + # runner: skeris + # secrets: + # REGISTRY_USER: ${{ secrets.REGISTRY_USER }} + # REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} DeployService: + if: contains(github.event.package.name, 'staging') runs-on: [frontstaging] - needs: CreateImage - uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/deploy.yml@v1.1.4-p7 - with: - runner: frontstaging - actionid: ${{ gitea.run_id }} + container: + image: gitea.pena:3000/penadevops/container-images/node-compose:main + env: + GITHUB_RUN_NUMBER: "${{ inputs.actionid }}" + volumes: + - /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock + steps: + - name: Check out repository code + uses: http://gitea.pena:3000/PenaDevops/actions.git/checkout@v1 + - run: compose -f deployments/staging/docker-compose.yaml up -d diff --git a/deployments/staging/docker-compose.yaml b/deployments/staging/docker-compose.yaml index 77b80c51..6c8aabe6 100644 --- a/deployments/staging/docker-compose.yaml +++ b/deployments/staging/docker-compose.yaml @@ -2,6 +2,6 @@ services: squiz: container_name: squiz restart: unless-stopped - image: gitea.pena/squiz/frontpanel/staging:$GITHUB_RUN_NUMBER + image: gitea.pena/squiz/frontanswerer/staging:latest hostname: squiz tty: true diff --git a/package.json b/package.json index d3cde959..62f67d00 100755 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "test": "craco test", "eject": "craco eject", "code:format": "prettier --write --ignore-unknown", + "deploy": "docker login gitea.pena && docker build -t gitea.pena/squiz/frontanswerer/$(git branch --show-current):latest . && docker push gitea.pena/squiz/frontanswerer/$(git branch --show-current):latest", "prepare": "husky install", "cypress:open": "cypress open", "cypress:run": "cypress run"