Update github actions #110
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: build_alpine | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - user-entrypoint.sh | |
| - Dockerfile | |
| - .github/workflows/build_alpine.yml | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - user-entrypoint.sh | |
| - Dockerfile | |
| - .github/workflows/build_alpine.yml | |
| repository_dispatch: | |
| types: | |
| - alpine_image_update | |
| workflow_dispatch: | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| env: | |
| TITLE: User Alpine | |
| strategy: | |
| matrix: | |
| include: | |
| - base-image: alpine:edge | |
| platforms: |- | |
| linux/amd64 | |
| linux/arm/v6 | |
| linux/arm/v7 | |
| linux/arm64 | |
| linux/386 | |
| linux/ppc64le | |
| linux/s390x | |
| tags: |- | |
| ghcr.io/phasecorex/user-alpine:edge | |
| docker.io/phasecorex/user-alpine:edge | |
| cache-from: ghcr.io/phasecorex/user-alpine:edge | |
| - base-image: alpine:3.24 | |
| platforms: |- | |
| linux/amd64 | |
| linux/arm/v6 | |
| linux/arm/v7 | |
| linux/arm64 | |
| linux/386 | |
| linux/ppc64le | |
| linux/s390x | |
| tags: |- | |
| ghcr.io/phasecorex/user-alpine:3.24 | |
| ghcr.io/phasecorex/user-alpine:latest | |
| docker.io/phasecorex/user-alpine:3.24 | |
| docker.io/phasecorex/user-alpine:latest | |
| cache-from: ghcr.io/phasecorex/user-alpine:3.24 | |
| - base-image: alpine:3.23 | |
| platforms: |- | |
| linux/amd64 | |
| linux/arm/v6 | |
| linux/arm/v7 | |
| linux/arm64 | |
| linux/386 | |
| linux/ppc64le | |
| linux/s390x | |
| tags: |- | |
| ghcr.io/phasecorex/user-alpine:3.23 | |
| docker.io/phasecorex/user-alpine:3.23 | |
| cache-from: ghcr.io/phasecorex/user-alpine:3.23 | |
| - base-image: alpine:3.22 | |
| platforms: |- | |
| linux/amd64 | |
| linux/arm/v6 | |
| linux/arm/v7 | |
| linux/arm64 | |
| linux/386 | |
| linux/ppc64le | |
| linux/s390x | |
| tags: |- | |
| ghcr.io/phasecorex/user-alpine:3.22 | |
| docker.io/phasecorex/user-alpine:3.22 | |
| cache-from: ghcr.io/phasecorex/user-alpine:3.22 | |
| - base-image: alpine:3.21 | |
| platforms: |- | |
| linux/amd64 | |
| linux/arm/v6 | |
| linux/arm/v7 | |
| linux/arm64 | |
| linux/386 | |
| linux/ppc64le | |
| linux/s390x | |
| tags: |- | |
| ghcr.io/phasecorex/user-alpine:3.21 | |
| docker.io/phasecorex/user-alpine:3.21 | |
| cache-from: ghcr.io/phasecorex/user-alpine:3.21 | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: phasecorex/user-alpine | |
| labels: | | |
| maintainer=${{ github.repository_owner }} | |
| org.opencontainers.image.vendor=${{ github.repository_owner }} | |
| org.opencontainers.image.title=${{ env.TITLE }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Login to DockerHub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push ${{ matrix.base-image }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| platforms: ${{ matrix.platforms }} | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ matrix.tags }} | |
| cache-from: ${{ matrix.cache-from }} | |
| build-args: | | |
| BASE_IMG=${{ matrix.base-image }} | |
| labels: ${{ steps.meta.outputs.labels }} |