Skip to content

Update deploy.yml to trigger deployment pipeline #14

Update deploy.yml to trigger deployment pipeline

Update deploy.yml to trigger deployment pipeline #14

Workflow file for this run

name: Deploy on EC2
on:
push:
branches: [master]
workflow_dispatch:
jobs:
docker_build:
name: Build and push docker container
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: .
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/wkk-offcial/lavalink_helper_api:latest,ghcr.io/wkk-offcial/lavalink_helper_api:{{ github.sha }}
trigger_deploy:
name: Trigger deployment pipeline
runs-on: ubuntu-latest
needs: docker_build
steps:
- name: Trigger deployment pipeline
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DEPLOY_API_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/WKK-Offcial/bot_deployment/actions/workflows/deploy.yml/dispatches \
-d '{"ref":"master"}'