Build and push image #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |