Level 11
Sep 23, 2021
1
Level 2
Github Action for Docker Runtime
Does anyone know how to use a Github action to deploy a Vapor application when pushing a new commit? I had it configured correctly when I was using one of the native runtimes. I had to switch to a Docker runtime because I needed a specific PHP extension. Now my commits are no longer deployed. My old action looked like:
name: Deploy to Staging
on:
push:
branches: [ staging ]
jobs:
vapor:
name: Check out and deploy using Vapor
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to Github Package Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Deploy to Staging
run: |
docker run \
--env VAPOR_API_TOKEN=${{ secrets.VAPOR_API_TOKEN }} \
--volume $(pwd):/app \
docker.pkg.github.com/ubient/laravel-vapor-action/laravel-vapor-action:latest \
deploy staging
Thanks!
Please or to participate in this conversation.