Replaces inline build/deploy steps with ivanch/pipeline-actions/build-and-push and ivanch/pipeline-actions/deploy-restart composite actions.
38 lines
1004 B
YAML
38 lines
1004 B
YAML
name: Build and Deploy (internal)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch: {}
|
|
|
|
env:
|
|
IMAGE: git.ivanch.me/ivanch/transmission-manager
|
|
|
|
jobs:
|
|
build_transmission_manager:
|
|
name: Build Transmission Manager Image
|
|
runs-on: ubuntu-amd64
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build and push multi-arch image
|
|
uses: ivanch/pipeline-actions/build-and-push@main
|
|
with:
|
|
image: ${{ env.IMAGE }}
|
|
registry_password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
ssh_key: ${{ secrets.SSH_KEY_DOCKERBUILD }}
|
|
|
|
deploy_transmission_manager:
|
|
name: Deploy Transmission Manager (internal)
|
|
runs-on: ubuntu-amd64
|
|
needs: build_transmission_manager
|
|
steps:
|
|
- name: Rollout restart deployment
|
|
uses: ivanch/pipeline-actions/deploy-restart@main
|
|
with:
|
|
kube_config: ${{ secrets.KUBE_CONFIG }}
|
|
deployment_name: transmission-manager
|
|
namespace: media
|