mirror of
https://github.com/int128/kubelogin.git
synced 2026-02-14 16:39:51 +00:00
46 lines
1015 B
YAML
46 lines
1015 B
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-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: docker/setup-qemu-action@v1
|
|
- uses: docker/setup-buildx-action@v1
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: /tmp/buildx
|
|
key: buildx-${{ runner.os }}-${{ github.sha }}
|
|
restore-keys: |
|
|
buildx-${{ runner.os }}-
|
|
- uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: int128/buildx-push-action@v1
|
|
with:
|
|
extra-args: --platform=linux/amd64,linux/arm64
|