Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: Update RunPod Template
on:
push:
branches:
- main
workflow_dispatch:
jobs:
update-template:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Authenticate with Docker Registry
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Fetch latest Docker image
run: |
IMAGE_TAG=$(docker pull my-image:latest | grep 'Digest:' | awk '{print $2}')
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
- name: Update RunPod template
run: |
curl -X POST "https://api.runpod.io/v1/template" \
-H "Authorization: Bearer ${{ secrets.RUNPOD_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"templateId": "ti08xt5xpn",
"container": {
"image": "my-image:${IMAGE_TAG}"
}
}'