Skip to content

Commit

Permalink
publish goreleaser vsn to registry + remove go brew dep
Browse files Browse the repository at this point in the history
Signed-off-by: DavidSpek <[email protected]>
  • Loading branch information
davidspek committed May 23, 2022
1 parent 6e0cfc1 commit 40d9523
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 2 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/goreleaser-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,111 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLAB_CLIENT_SECRET: ${{ secrets.GITLAB_CLIENT_SECRET }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
publish:
name: Build and push CLI container
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
needs: goreleaser
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v3
with:
# list of Docker images to use as base name for tags
images: |
dkr.plural.sh/plural/plural-cli
gcr.io/pluralsh/plural-cli
ghcr.io/pluralsh/plural-cli
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{raw}},value=v${{ needs.goreleaser.outputs.metadata.version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- uses: google-github-actions/auth@v0
with:
workload_identity_provider: 'projects/${{ secrets.GOOGLE_PROJECT_ID }}/locations/global/workloadIdentityPools/github/providers/github'
service_account: '[email protected]'
token_format: 'access_token'
create_credentials_file: true
- uses: google-github-actions/[email protected]
- name: Login to gcr
run: gcloud auth configure-docker -q
- name: Login to plural registry
uses: docker/login-action@v1
with:
registry: dkr.plural.sh
username: [email protected]
password: ${{ secrets.PLURAL_ACCESS_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: "."
file: "./Dockerfile"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
publish-cloud:
name: Build and push CLI cloud container
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
needs: goreleaser
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v3
with:
# list of Docker images to use as base name for tags
images: |
dkr.plural.sh/plural/plural-cli
gcr.io/pluralsh/plural-cli
ghcr.io/pluralsh/plural-cli
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{raw}},value=v${{ needs.goreleaser.outputs.metadata.version }}-cloud
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- uses: google-github-actions/auth@v0
with:
workload_identity_provider: 'projects/${{ secrets.GOOGLE_PROJECT_ID }}/locations/global/workloadIdentityPools/github/providers/github'
service_account: '[email protected]'
token_format: 'access_token'
create_credentials_file: true
- uses: google-github-actions/[email protected]
- name: Login to gcr
run: gcloud auth configure-docker -q
- name: Login to plural registry
uses: docker/login-action@v1
with:
registry: dkr.plural.sh
username: [email protected]
password: ${{ secrets.PLURAL_ACCESS_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: "."
file: "./dockerfiles/Dockerfile.cloud"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 0 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ brews:
# Packages your package depends on.
dependencies:
- name: go
type: build
- name: helm
type: recommended
- name: kubectl
Expand Down

0 comments on commit 40d9523

Please sign in to comment.