|
| 1 | +# Copyright 2022 Contributors to the Eclipse Foundation |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | +# SPDX-License-Identifier: Apache-2.0 |
| 16 | + |
| 17 | +name: Build All (Developer Build) |
| 18 | + |
| 19 | +on: |
| 20 | + workflow_dispatch: |
| 21 | + |
| 22 | +jobs: |
| 23 | + build-container-image: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + permissions: |
| 26 | + contents: read |
| 27 | + packages: write |
| 28 | + id-token: write |
| 29 | + strategy: |
| 30 | + matrix: |
| 31 | + arch: [ amd64, arm64 ] |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v3 |
| 34 | + with: |
| 35 | + submodules: recursive |
| 36 | + |
| 37 | + - name: Build Docker image |
| 38 | + uses: ./.github/actions/build-container-image |
| 39 | + with: |
| 40 | + arch: ${{ matrix.arch }} |
| 41 | + run_number: ${{ github.run_number }} |
| 42 | + commit_hash: ${{ github.sha }} |
| 43 | + username: ${{ github.actor }} |
| 44 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 45 | + suffix: "-developer" |
| 46 | + |
| 47 | + push-container-image: |
| 48 | + runs-on: ubuntu-latest |
| 49 | + needs: build-container-image |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v3 |
| 52 | + with: |
| 53 | + submodules: recursive |
| 54 | + |
| 55 | + - id: repo_name |
| 56 | + uses: ASzc/change-string-case-action@v1 |
| 57 | + with: |
| 58 | + string: ${{ github.repository }} |
| 59 | + |
| 60 | + - name: Log into registry ghcr.io |
| 61 | + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c |
| 62 | + with: |
| 63 | + registry: ghcr.io |
| 64 | + username: ${{ github.actor }} |
| 65 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 66 | + |
| 67 | + - name: Create merged manifest and push |
| 68 | + env: |
| 69 | + REPO: ghcr.io/${{ steps.repo_name.outputs.lowercase }} |
| 70 | + run: | |
| 71 | + docker buildx imagetools create -t ghcr.io/${{ steps.repo_name.outputs.lowercase }}/self-update-agent-developer:build-${{ github.run_number }} ghcr.io/${{ steps.repo_name.outputs.lowercase }}/self-update-agent-developer:build-${{ github.run_number }}_arm64 ghcr.io/${{ steps.repo_name.outputs.lowercase }}/self-update-agent-developer:build-${{ github.run_number }}_amd64 |
| 72 | + docker buildx imagetools create -t ghcr.io/${{ steps.repo_name.outputs.lowercase }}/self-update-agent-developer:latest ghcr.io/${{ steps.repo_name.outputs.lowercase }}/self-update-agent-developer:latest_arm64 ghcr.io/${{ steps.repo_name.outputs.lowercase }}/self-update-agent-developer:latest_amd64 |
| 73 | +
|
0 commit comments