name: Gitea Actions for prod run-name: ${{ gitea.actor }} deploy prod on: push: tags: - 'v*' jobs: Deploy-Staging-Actions: runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest steps: - name: Check out repository code uses: actions/checkout@v3 with: github-server-url: http://localhost:3000 - name: Login to the registry uses: docker/login-action@v2 with: registry: http://localhost:3000 username: ${{ github.repository_owner }} password: ${{ secrets.token }} - name: Build and push uses: docker/build-push-action@v2 with: context: ./app file: ./app/Dockerfile platforms: linux/amd64 push: true tags: localhost:3000/${{ gitea.repository }}:latest - name: Generate stack yml for deployment uses: nowactions/envsubst@v1 with: input: ./stack_prod.tpl.yml output: ./stack_prod.yml env: CACHE_HOST: "${{ vars.CACHE_HOST }}" CACHE_PORT: "${{ vars.CACHE_PORT }}" APP_PORT: "${{ vars.APP_PORT }}" SECRET_KEY: "${{ vars.SECRET_KEY }}" TTL: "${{ vars.TTL }}" - name: Deploy run: docker stack deploy -c ./stack_prod.yml inspirasite_prod