Files
2026-04-02 19:35:52 +09:00

24 lines
940 B
YAML

name: Build and deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Docker image
run: DOCKER_BUILDKIT=0 docker build --network=wsc2026-infra_wsc-network . --tag git.webtech.worldskillskorea.io/${{ github.repository }}:latest
- name: Login to registry
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.webtech.worldskillskorea.io -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
- name: Push image
run: docker push git.webtech.worldskillskorea.io/${{ github.repository }}:latest
- name: Deploy
run: |
curl -s -X POST https://admin.webtech.worldskillskorea.io/api/deploy \
-H "Authorization: Bearer ${{ secrets.PULLDECK_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"image":"git.webtech.worldskillskorea.io/${{ github.repository }}:latest"}'