From 654fc8e17aca7bded3575843d38cca68463a3f0c Mon Sep 17 00:00:00 2001 From: Michael Heap Date: Wed, 23 Aug 2023 10:42:42 +0100 Subject: [PATCH] Add GitHub Action to publish images --- .github/workflows/docker.yaml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/docker.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000..1c0a7e6 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,43 @@ +name: Build Docker Images + +on: + push: + branches: + - "package-services" + +jobs: + docker: + runs-on: ubuntu-latest + strategy: + matrix: + app: + - dir: flight-data + name: flights + - dir: flight-data + name: routes + - dir: sales + name: bookings + - dir: sales + name: customers + - dir: . + name: experience + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: "${{ matrix.app.dir }}/${{ matrix.app.name }}" + push: true + platforms: linux/amd64,linux/arm64 + tags: ghcr.io/kong/kongair-${{ matrix.app.name }}:latest