name: Push web base image on: push: branches: - main release: types: [published, created, edited] pull_request: jobs: build_base_image: strategy: matrix: python: [3.8, 3.9, 3.10, 3.11] alpine: ["3.15", "3.16", "3.17"] include: - python: 3.10.6 alpine: "3.16" # exclude: # - python: 3.11.1 # alpine: "3.15" runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Login to ghcr uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Web-base Meta id: meta-web-base uses: docker/metadata-action@v3 with: images: | ghcr.io/${{ github.repository_owner }}/web-base - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 with: platforms: linux/amd64,linux/arm64 - name: Build and push uses: docker/build-push-action@v2 with: build-args: | PYTHON_VERSION=${{ matrix.python }} ALPINE_VERSION=${{ matrix.alpine }} context: . file: ./Docker/Dockerfile.base push: true tags: ${{ matrix.python }}-alpine${{ matrix.alpine }} # - name: Poetry Meta # id: meta-web-poetry # uses: docker/metadata-action@v3 # with: # images: | # ghcr.io/${{ github.repository_owner }}/web-base # # - name: Set up Docker Buildx # uses: docker/setup-buildx-action@v2 # with: # platforms: linux/amd64,linux/arm64 # build-args: | # PYTHON_VERSION=${{ matrix.python }} # ALPINE_VERSION=${{ matrix.alpine }} # # - name: Build and push Poetry # uses: docker/build-push-action@v2 # with: # context: . # file: ./Docker/Dockerfile.poetry # platforms: linux/amd64,linux/arm64 # push: true # tags: ${{ matrix.python }}-alpine${{ matrix.alpine }}