Skip to content

Commit 5aefc0a

Browse files
authored
Merge pull request #19 from ruby-no-kai/syslog
syslog
2 parents 3d5ebe0 + a702bed commit 5aefc0a

File tree

3 files changed

+106
-0
lines changed

3 files changed

+106
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
name: 'docker-fluentd',
3+
on: {
4+
push: {
5+
branches: ['master', 'test'],
6+
paths: [
7+
'docker/fluentd/**',
8+
'.github/workflows/docker-fluentd.jsonnet',
9+
],
10+
},
11+
},
12+
jobs: {
13+
build: {
14+
name: 'build',
15+
'runs-on': 'ubuntu-latest',
16+
permissions: { 'id-token': 'write', contents: 'read' },
17+
steps: [
18+
{ uses: 'docker/setup-qemu-action@v2' },
19+
{ uses: 'docker/setup-buildx-action@v2' },
20+
{
21+
uses: 'aws-actions/configure-aws-credentials@v1',
22+
with: {
23+
'aws-region': 'ap-northeast-1',
24+
'role-to-assume': 'arn:aws:iam::005216166247:role/GhaDockerPush',
25+
'role-skip-session-tagging': true,
26+
},
27+
},
28+
{
29+
uses: 'aws-actions/amazon-ecr-login@v1',
30+
id: 'login-ecr',
31+
},
32+
{
33+
uses: 'docker/build-push-action@v3',
34+
with: {
35+
context: '{{defaultContext}}:docker/fluentd',
36+
platforms: std.join(',', ['linux/arm64']),
37+
tags: std.join(',', [
38+
'${{ steps.login-ecr.outputs.registry }}/fluentd:${{ github.sha }}',
39+
'${{ steps.login-ecr.outputs.registry }}/fluentd:latest',
40+
]),
41+
push: true,
42+
},
43+
},
44+
],
45+
},
46+
},
47+
}

.github/workflows/docker-fluentd.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"jobs": {
3+
"build": {
4+
"name": "build",
5+
"permissions": {
6+
"contents": "read",
7+
"id-token": "write"
8+
},
9+
"runs-on": "ubuntu-latest",
10+
"steps": [
11+
{
12+
"uses": "docker/setup-qemu-action@v2"
13+
},
14+
{
15+
"uses": "docker/setup-buildx-action@v2"
16+
},
17+
{
18+
"uses": "aws-actions/configure-aws-credentials@v1",
19+
"with": {
20+
"aws-region": "ap-northeast-1",
21+
"role-skip-session-tagging": true,
22+
"role-to-assume": "arn:aws:iam::005216166247:role/GhaDockerPush"
23+
}
24+
},
25+
{
26+
"id": "login-ecr",
27+
"uses": "aws-actions/amazon-ecr-login@v1"
28+
},
29+
{
30+
"uses": "docker/build-push-action@v3",
31+
"with": {
32+
"context": "{{defaultContext}}:docker/fluentd",
33+
"platforms": "linux/arm64",
34+
"push": true,
35+
"tags": "${{ steps.login-ecr.outputs.registry }}/fluentd:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/fluentd:latest"
36+
}
37+
}
38+
]
39+
}
40+
},
41+
"name": "docker-fluentd",
42+
"on": {
43+
"push": {
44+
"branches": [
45+
"master",
46+
"test"
47+
],
48+
"paths": [
49+
"docker/fluentd/**",
50+
".github/workflows/docker-fluentd.jsonnet"
51+
]
52+
}
53+
}
54+
}

fluentd/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM fluent/fluentd:v1.15-debian-1
2+
3+
USER root
4+
RUN fluent-gem install fluent-plugin-prometheus -v 2.0.3 && \
5+
fluent-gem install fluent-plugin-s3 -v 1.7.1

0 commit comments

Comments
 (0)