name: Create docker images (manual) on: workflow_dispatch: inputs: version: type: string description: Version required: true jobs: build: name: Build, push, and deploy runs-on: ubuntu-latest strategy: matrix: db-type: [postgresql, mysql] steps: - name: Checkout uses: actions/checkout@v2 - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2 - name: Login to GHCR if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and publish for ${{ matrix.db-type }} uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ghcr.io/${{ github.repository }}:${{ matrix.db-type }}-${{ inputs.version }}, ghcr.io/${{ github.repository }}:${{ matrix.db-type }}-latest build-args: DATABASE_TYPE=${{ matrix.db-type }}