|
@@ -0,0 +1,41 @@
|
|
|
+---
|
|
|
+name: dockerhub
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ branches:
|
|
|
+ - '5.*'
|
|
|
+
|
|
|
+jobs:
|
|
|
+ pre-docker:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v2
|
|
|
+ - id: set-matrix
|
|
|
+ run: |
|
|
|
+ sudo apt-get install jq
|
|
|
+ echo "::set-output name=matrix::$(bash get-all-dist.sh)"
|
|
|
+ outputs:
|
|
|
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
|
+ docker:
|
|
|
+ needs: pre-docker
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ strategy:
|
|
|
+ matrix:
|
|
|
+ dist: ${{fromJson(needs.pre-docker.outputs.matrix)}}
|
|
|
+ steps:
|
|
|
+ - name: Set up QEMU
|
|
|
+ uses: docker/setup-qemu-action@v2
|
|
|
+ - name: Set up Docker Buildx
|
|
|
+ uses: docker/setup-buildx-action@v2
|
|
|
+ - name: Login to DockerHub
|
|
|
+ uses: docker/login-action@v2
|
|
|
+ with:
|
|
|
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
+ - name: Build and push
|
|
|
+ uses: docker/build-push-action@v3
|
|
|
+ with:
|
|
|
+ context: "{{defaultContext}}:${{ matrix.dist }}"
|
|
|
+ push: true
|
|
|
+ tags: kamailio/kamailio:${{ github.ref_name }}-${{ matrix.dist }}
|