Update dockerfiles (#23) #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: HyperCPU CI/CD Pipeline (update Docker images) | |
| on: | |
| schedule: | |
| - cron: "0 0 */7 * *" | |
| push: | |
| paths: | |
| - 'docker/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: "Update ${{ matrix.config.name }} Docker image" | |
| strategy: | |
| matrix: | |
| config: | |
| - tag: fedora | |
| name: Fedora | |
| - tag: debian-stable | |
| name: Debian Stable | |
| - tag: debian-unstable | |
| name: Debian Unstable | |
| - tag: archlinux | |
| name: Arch Linux | |
| - tag: gentoo-glibc | |
| name: Gentoo GLibc | |
| - tag: alpine | |
| name: Alpine | |
| - tag: ubuntu | |
| name: Ubuntu | |
| steps: | |
| - name: Install Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: hyperwin | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| submodules: true | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: "{{ defaultContext }}:docker/${{ matrix.config.tag }}" | |
| push: true | |
| tags: hyperwin/hcpu-ci:${{ matrix.config.tag }} | |
| build-gentoo-musl-stage1: | |
| runs-on: ubuntu-latest | |
| name: "Update Gentoo Musl Docker image - stage 1" | |
| steps: | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: hyperwin | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| submodules: true | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: "{{ defaultContext }}:docker/gentoo-musl/stage1" | |
| push: true | |
| tags: hyperwin/hcpu-ci:gentoo-musl-build | |
| build-gentoo-musl-stage2: | |
| runs-on: ubuntu-latest | |
| name: "Update Gentoo Musl Docker image - stage 2" | |
| needs: build-gentoo-musl-stage1 | |
| steps: | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: hyperwin | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| submodules: true | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: "{{ defaultContext }}:docker/gentoo-musl/stage2" | |
| push: true | |
| tags: hyperwin/hcpu-ci:gentoo-musl | |