Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests that ko can push to quay.io and Dockerhub #778

Merged
merged 3 commits into from
Jul 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/registries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Push to registries

on:
pull_request_target:
branches: ['main']
push:
branches: ['main']
workflow_dispatch: # Allow manual runs.

jobs:
quay:
name: Push to quay.io
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- env:
QUAY_USERNAME: ko-testing
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
KO_DOCKER_REPO: quay.io/ko-testing/test
run: |
echo ${QUAY_PASSWORD} | go run ./ login --username=${QUAY_USERNAME} --password-stdin quay.io
go run ./ build --platform=all ./test/

dockerhub:
name: Push to dockerhub
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- env:
DOCKERHUB_USERNAME: kotesting
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
KO_DOCKER_REPO: kotesting/test
run: |
echo ${DOCKERHUB_PASSWORD} | go run ./ login --username=${DOCKERHUB_USERNAME} --password-stdin index.docker.io
go run ./ build --platform=all ./test/