Refactoring device handling and remove metadata hash (#1199) #74
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: UDMI Container Image Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| images: | |
| name: Build Docker Images | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| container: [ "udmis", "validator", "pubber", "services" ] | |
| env: | |
| PUSH_REGISTRY: ghcr.io | |
| CONTAINER: ${{ matrix.container }} | |
| REF_NAME: ${{ github.ref_name }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Log in to the github registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.PUSH_REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Convert repository name to lowercase | |
| run: echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV | |
| - name: Container build and push | |
| run: | | |
| IMAGE_REF=$PUSH_REGISTRY/$GITHUB_REPOSITORY_OWNER/udmi/$CONTAINER:latest | |
| bin/clone_model | |
| $CONTAINER/bin/build check | |
| bin/container $CONTAINER push --no-check $IMAGE_REF | |
| echo Pushed built $CONTAINER container as $IMAGE_REF | tee -a $GITHUB_STEP_SUMMARY | |
| discovery: | |
| name: Build and deploy discovery node image | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| permissions: | |
| contents: read | |
| packages: write | |
| timeout-minutes: 10 | |
| env: | |
| PUSH_REGISTRY: ghcr.io | |
| REF_NAME: ${{ github.ref_name }} | |
| BUILDENV: ${{ matrix.environments }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Log in to the github registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.PUSH_REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build and push image | |
| run: | | |
| IMAGE_REF="$PUSH_REGISTRY/$GITHUB_REPOSITORY_OWNER/udmi/discoverynode" | |
| IMAGE_TAG=latest | |
| ./misc/discoverynode/bin/build_container_and_push $IMAGE_REF:$IMAGE_TAG | |
| echo Pushed built $CONTAINER container as $IMAGE_REF:$IMAGE_TAG | tee -a $GITHUB_STEP_SUMMARY | |