Skip to content

Build and push image #8

Build and push image

Build and push image #8

name: Build and push image
on: workflow_dispatch
env:
IMAGE_NAME: relistennet/relisten-sonos # <‑‑ repo/image name in the registry
REGISTRY: 100.97.22.118:32000
TAG: latest
jobs:
build_push_and_rollout_restart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Tailscale
uses: tailscale/github-action@v3
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
use-cache: 'true'
tags: tag:ci
version: latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[registry."${{ env.REGISTRY }}"]
http = true
insecure = true
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64 # x86_64
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
push: true
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: rollout restart deployment relisten-sonos