|
| 1 | +name: Manual Docker Image Push |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + tag: |
| 7 | + description: Image Tag Name |
| 8 | + default: test |
| 9 | + required: true |
| 10 | + |
| 11 | +env: |
| 12 | + REGISTRY: ghcr.io |
| 13 | + REPO_NAME: ${{ github.repository }} |
| 14 | + |
| 15 | +jobs: |
| 16 | + build-and-push-image: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + permissions: |
| 19 | + contents: read |
| 20 | + packages: write |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: Checkout repository |
| 24 | + uses: actions/checkout@v3 |
| 25 | + - name: Set up QEMU |
| 26 | + uses: docker/setup-qemu-action@v2 |
| 27 | + with: |
| 28 | + platforms: 'amd64,arm' |
| 29 | + - name: Set up Docker Buildx |
| 30 | + uses: docker/setup-buildx-action@v2 |
| 31 | + - name: Get Git Submodules |
| 32 | + run: git submodule update --init --recursive |
| 33 | + |
| 34 | + - name: Log in to the Container registry |
| 35 | + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 |
| 36 | + with: |
| 37 | + registry: ${{ env.REGISTRY }} |
| 38 | + username: ${{ github.actor }} |
| 39 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 40 | + |
| 41 | + - name: Extract metadata (tags, labels) for Docker |
| 42 | + id: meta |
| 43 | + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 |
| 44 | + with: |
| 45 | + images: | |
| 46 | + ${{ env.REGISTRY }}/${{ env.REPO_NAME }} |
| 47 | + |
| 48 | + |
| 49 | + - name: Build AppBroker and push Docker image |
| 50 | + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc |
| 51 | + with: |
| 52 | + context: . |
| 53 | + platforms: linux/amd64,linux/arm/v7 |
| 54 | + file: AppBrokerASP/Dockerfile |
| 55 | + push: true |
| 56 | + tags: ghcr.io/susch19/appbroker:${{ github.event.inputs.tag }} |
| 57 | + labels: ${{ steps.meta.outputs.labels }} |
| 58 | + |
| 59 | + - name: Build TCPProxy and push Docker image |
| 60 | + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc |
| 61 | + with: |
| 62 | + context: . |
| 63 | + platforms: linux/amd64,linux/arm/v7 |
| 64 | + file: TcpProxy/Dockerfile |
| 65 | + push: true |
| 66 | + tags: ghcr.io/susch19/appbroker-tcpproxy:${{ github.event.inputs.tag }} |
| 67 | + labels: ${{ steps.meta.outputs.labels }} |
| 68 | + |
0 commit comments