Docker nightly #1195
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: Docker nightly | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags-ignore: | |
| - '*' | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
| required: false | |
| default: false | |
| # set docker tag for all steps | |
| env: | |
| DOCKERTAG: nightly | |
| jobs: | |
| docker_build: | |
| runs-on: ${{ matrix.target.runs }} | |
| permissions: | |
| packages: write | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - rocky | |
| - debian | |
| target: | |
| - runs: ubuntu-24.04 | |
| platform: amd64 | |
| - runs: ubuntu-24.04-arm | |
| platform: arm64 | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v6 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Log in to GitHub Docker Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.PTA }} | |
| - name: Build and Push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| file: Dockerfile.omd-labs-${{ matrix.os }} | |
| build-args: | | |
| OMD_VERSION=${{ github.ref }} | |
| INSTALL_COMMON_RETRIES=3 | |
| tags: | | |
| consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-${{ matrix.target.platform }} | |
| ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-${{ matrix.target.platform }} | |
| platforms: linux/${{ matrix.target.platform }} | |
| manifest: | |
| runs-on: ubuntu-24.04 | |
| needs: docker_build | |
| permissions: | |
| packages: write | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - rocky | |
| - debian | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Log in to GitHub Docker Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.PTA }} | |
| - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | |
| uses: mxschmitt/action-tmate@v3 | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| - name: push manifest to dockerhub | |
| run: | | |
| docker manifest create consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }} \ | |
| consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-amd64 \ | |
| consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-arm64 | |
| docker manifest push consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }} | |
| - name: push manifest to github | |
| run: | | |
| docker manifest create ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }} \ | |
| ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-amd64 \ | |
| ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-arm64 | |
| docker manifest push ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }} |