-
Notifications
You must be signed in to change notification settings - Fork 468
feat(github-action): build and publish container images #562
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
8963caf
c6c3c86
3f5a7df
da7a4da
edc1a8f
ae17724
ca0e960
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Publish Kraken Images | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
knechtionscoding marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
knechtionscoding marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| tags: | ||
| - '*' | ||
knechtionscoding marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-22.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - component: kraken-agent | ||
| dockerfile: docker/agent/Dockerfile | ||
| - component: kraken-build-index | ||
| dockerfile: docker/build-index/Dockerfile | ||
| - component: kraken-origin | ||
| dockerfile: docker/origin/Dockerfile | ||
| - component: kraken-proxy | ||
| dockerfile: docker/proxy/Dockerfile | ||
| - component: kraken-testfs | ||
| dockerfile: docker/testfs/Dockerfile | ||
| - component: kraken-tracker | ||
| dockerfile: docker/tracker/Dockerfile | ||
| - component: kraken-herd | ||
| dockerfile: docker/herd/Dockerfile | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: amd64,arm64 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Generate image metadata (${{ matrix.component }}) | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/${{ github.repository_owner }}/${{ matrix.component }} | ||
| tags: | | ||
|
Comment on lines
+56
to
+57
|
||
| type=ref,event=tag | ||
| type=ref,event=branch | ||
| type=sha,format=short | ||
knechtionscoding marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Build and push ${{ matrix.component }} | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: ${{ matrix.dockerfile }} | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
Uh oh!
There was an error while loading. Please reload this page.