mirror of
https://github.com/int128/kubelogin.git
synced 2026-05-15 12:26:50 +00:00
77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
name: docker
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- .github/workflows/docker.yaml
|
|
- pkg/**
|
|
- go.*
|
|
- Dockerfile
|
|
- Makefile
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- .github/workflows/docker.yaml
|
|
- pkg/**
|
|
- go.*
|
|
- Dockerfile
|
|
- Makefile
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
build-linux-amd64:
|
|
uses: int128/docker-build-workflow/.github/workflows/build.yaml@v1
|
|
with:
|
|
platforms: linux/amd64
|
|
flavor: latest=false,suffix=-linux-amd64
|
|
|
|
build-linux-arm64:
|
|
uses: int128/docker-build-workflow/.github/workflows/build.yaml@v1
|
|
with:
|
|
platforms: linux/arm64
|
|
flavor: latest=false,suffix=-linux-arm64
|
|
|
|
build-linux-ppc64le:
|
|
uses: int128/docker-build-workflow/.github/workflows/build.yaml@v1
|
|
with:
|
|
platforms: linux/ppc64le
|
|
flavor: latest=false,suffix=-linux-ppc64le
|
|
|
|
build:
|
|
needs:
|
|
- build-linux-amd64
|
|
- build-linux-arm64
|
|
- build-linux-ppc64le
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
outputs:
|
|
image-uri: ghcr.io/${{ github.repository }}@${{ steps.build.outputs.digest }}
|
|
steps:
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/metadata-action@v5
|
|
id: metadata
|
|
with:
|
|
images: ghcr.io/${{ github.repository }}
|
|
- uses: int128/docker-manifest-create-action@v2
|
|
id: build
|
|
with:
|
|
tags: ${{ steps.metadata.outputs.tags }}
|
|
sources: |
|
|
ghcr.io/${{ github.repository }}@${{ needs.build-linux-amd64.outputs.digest }}
|
|
ghcr.io/${{ github.repository }}@${{ needs.build-linux-arm64.outputs.digest }}
|
|
ghcr.io/${{ github.repository }}@${{ needs.build-linux-ppc64le.outputs.digest }}
|
|
|
|
test:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: docker run --rm '${{ needs.build.outputs.image-uri }}' --help
|