emoncms docker images to docker hub - mention of emoncms version #33
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: emoncms docker images to docker hub - mention of emoncms version | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| github_username: | |
| description: 'github username for emoncms src and symlinked modules' | |
| required: true | |
| type: string | |
| default: 'emoncms' | |
| branch: | |
| description: 'branch to use for core and modules : stable or master ?' | |
| required: true | |
| type: string | |
| default: 'stable' | |
| alpine_version: | |
| description: 'alpine version' | |
| required: true | |
| type: string | |
| default: '3.20' | |
| php_version: | |
| description: 'php version' | |
| required: true | |
| type: string | |
| default: '83' | |
| use_redispy_apk: | |
| description: 'install redispy through : apk 0 or 1 ?' | |
| required: true | |
| type: string | |
| default: '1' | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - id: emoncms_version | |
| name: get emoncms version | |
| run: | | |
| wget https://raw.githubusercontent.com/${{ inputs.github_username }}/emoncms/${{ inputs.branch }}/version.json | |
| version=$(cat version.json | jq --raw-output '.version') | |
| echo $version | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
| build-args: | | |
| "EMONCMS_SRC=https://github.com/${{ inputs.github_username }}/emoncms" | |
| "SYMLINKED_MODULES_URL=https://github.com/${{ inputs.github_username }}" | |
| "BRANCH=${{ inputs.branch }}" | |
| "BUILD_FROM=alpine:${{ inputs.alpine_version }}" | |
| "PHP_VER=${{ inputs.php_version }}" | |
| "PHP_CONF=/etc/php${{ inputs.php_version }}/conf.d" | |
| "USE_REDISPY_APK=${{ inputs.use_redispy_apk }}" | |
| push: true | |
| tags: ${{ secrets.DOCKERHUB_USERNAME }}/emoncms:alpine${{ inputs.alpine_version }}_emoncms${{ steps.emoncms_version.outputs.version }} |