# DO NOT EDIT
# this file is automatically generated by the "docker:pipeline" rake task
name: Generate CI Images
on:
  workflow_dispatch: {}
  schedule:
    - cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3
# reference: https://github.com/marketplace/actions/build-and-push-docker-images
jobs:
  build_images:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.1"
          bundler-cache: true
      - uses: docker/setup-buildx-action@v1
      - uses: docker/login-action@v1
        with:
          registry: ghcr.io
          username: ${{github.actor}}
          password: ${{secrets.GITHUB_TOKEN}}
      - name: alpine
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:alpine
          file: oci-images/nokogiri-test/alpine.dockerfile
      - name: mri-2.6
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:mri-2.6
          file: oci-images/nokogiri-test/mri-2.6.dockerfile
      - name: mri-2.7
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:mri-2.7
          file: oci-images/nokogiri-test/mri-2.7.dockerfile
      - name: mri-3.0
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:mri-3.0
          file: oci-images/nokogiri-test/mri-3.0.dockerfile
      - name: mri-3.1
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:mri-3.1
          file: oci-images/nokogiri-test/mri-3.1.dockerfile
      - name: truffle-nightly
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:truffle-nightly
          file: oci-images/nokogiri-test/truffle-nightly.dockerfile
      - name: ubuntu
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:ubuntu
          file: oci-images/nokogiri-test/ubuntu.dockerfile
      - name: ubuntu32
        uses: docker/build-push-action@v2
        with:
          context: "."
          push: true
          tags: ghcr.io/sparklemotion/nokogiri-test:ubuntu32
          file: oci-images/nokogiri-test/ubuntu32.dockerfile
