mirror of
https://github.com/ko-build/ko.git
synced 2026-06-18 20:14:08 +02:00
Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/5727f247b64f324ec403ac56ae05e220fd02b65f...5fd3084fc36e372ff1fff382a39b10d03659f355) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
85 lines
2.6 KiB
YAML
85 lines
2.6 KiB
YAML
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
|
with:
|
|
go-version: '1.20'
|
|
check-latest: true
|
|
- env:
|
|
QUAY_USERNAME: ko-testing+test
|
|
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/ --sbom=none --bare
|
|
|
|
dockerhub:
|
|
name: Push to dockerhub
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
|
with:
|
|
go-version: '1.20'
|
|
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/ --bare
|
|
|
|
ecr:
|
|
name: Push to ECR
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
# This is an AWS account that Chainguard provides to enable
|
|
# go-containerregistry and ko to test ECR support.
|
|
AWS_ACCOUNT: 479305788615
|
|
AWS_REGION: us-west-2
|
|
REPOSITORY: ko-ecr-e2e-testing
|
|
|
|
permissions:
|
|
# This lets us clone the repo
|
|
contents: read
|
|
# This lets us mint identity tokens for federation with AWS.
|
|
id-token: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
|
with:
|
|
go-version: '1.20'
|
|
check-latest: true
|
|
|
|
- name: Install ko
|
|
run: go install .
|
|
|
|
- name: Configure AWS Credentials
|
|
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
|
|
with:
|
|
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT }}:role/federated-ecr-readwrite
|
|
aws-region: ${{ env.AWS_REGION }}
|
|
|
|
- name: Test ko build
|
|
run: |
|
|
export KO_DOCKER_REPO=${{ env.AWS_ACCOUNT }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ env.REPOSITORY }}
|
|
|
|
ko build --bare ./test
|