Some checks failed
Build, Push and Redeploy Docker Image / build-and-push (push) Failing after 5m3s
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Build, Push and Redeploy Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
REGISTRY_HOST: git.home
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU (for multi-arch, optional)
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
run: |
|
|
echo "${{ secrets.GIT_PASSWORD }}" | docker login "${{ env.REGISTRY_HOST }}" -u "${{ github.actor }}" --password-stdin
|
|
|
|
- name: Get short SHA
|
|
id: vars
|
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
|
|
|
|
- name: Build and push
|
|
run: |
|
|
docker buildx build \
|
|
--no-cache \
|
|
--push \
|
|
--platform linux/amd64 \
|
|
--tag ${{ env.REGISTRY_HOST }}/drholy/n8n-ffmpeg-proxy:${{ env.sha_short }} \
|
|
--tag ${{ env.REGISTRY_HOST }}/drholy/n8n-ffmpeg-proxy:latest \
|
|
--push \
|
|
.
|
|
|
|
- name: Redeploy stack in Portainer
|
|
run: |
|
|
curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}" |