Skip to content

Commit 922fb3c

Browse files
committed
init
0 parents  commit 922fb3c

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.github

.github/workflows/docker.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
env:
2+
DOCKER_IMAGE_NAME: parca-agent
3+
DOCKER_REGISTRY: ghcr.io
4+
5+
name: Build and Push Docker Image
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
tags:
11+
- '[0-9]+.[0-9]+.[0-9]+'
12+
13+
jobs:
14+
docker:
15+
name: Build and Push Docker Image
16+
runs-on: self-hosted
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v5
21+
22+
- name: Docker meta
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Login to Docker Registry
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ${{ env.DOCKER_REGISTRY }}
35+
username: ${{ github.repository_owner }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Build and push
39+
uses: docker/build-push-action@v6
40+
with:
41+
context: .
42+
file: ./Dockerfile
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
cache-from: type=gha,scope=docker
46+
cache-to: type=gha,mode=max,scope=docker

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM cgr.dev/chainguard/static:latest
2+
USER root
3+
4+
COPY parca-agent /parca-agent
5+
6+
CMD ["/parca-agent"]

0 commit comments

Comments
 (0)