Skip to content

Commit

Permalink
use build action
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Mar 1, 2024
1 parent e2fb629 commit 120a11d
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ on:
- "v*.*.*"
permissions:
contents: read
id-token: write
packages: write
env:
GOPATH: /home/runner/go/
GOPROXY: "https://proxy.golang.org"
NG_CLI_ANALYTICS: ci
NODE_OPTIONS: "--max-old-space-size=8192"
TERM: xterm
jobs:
release:
Expand All @@ -38,17 +35,20 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
- id: meta
uses: docker/metadata-action@v5
with:
go-version-file: modules/api/go.mod
check-latest: true
cache-dependency-path: modules/api/go.sum
- uses: actions/setup-node@v4
with:
node-version: 18.14.0
- working-directory: modules/web
run: yarn

images: |
ghcr.io/kubernetes/dashboard-api
docker.io/kubernetesui/dashboard-api
ghcr.io/kubernetes/dashboard-auth
docker.io/kubernetesui/dashboard-auth
ghcr.io/kubernetes/dashboard-web
docker.io/kubernetesui/dashboard-web
ghcr.io/kubernetes/metrics-scraper
docker.io/kubernetesui/metrics-scraper
tags: |
type=semver,pattern={{version}}
- uses: docker/setup-qemu-action@v3.0.0
- uses: docker/setup-buildx-action@v3.0.0
- uses: docker/login-action@v3.0.0
Expand All @@ -61,6 +61,16 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- if: github.event_name == 'push' && contains(github.ref, 'master')
run: PATH=$PATH:$GOPATH/bin make deploy-dev
uses: docker/build-push-action@v5
with:
context: .
push: false # TODO
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
run: PATH=$PATH:$GOPATH/bin make deploy
uses: docker/build-push-action@v5
with:
context: .
push: false # TODO
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 120a11d

Please sign in to comment.