Skip to content

Commit 2aafdba

Browse files
committed
git filter-repo --path docker --path .github --path gen-workflows.rb --path-rename docker/:
1 parent 691132e commit 2aafdba

8 files changed

+25
-23
lines changed

.github/workflows/docker-build-simple.libsonnet

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Convention:
22
// Workflow definition: .github/workflow/docker-#{name}.yml
3-
// Docker manifest docker/#{name}/Dockerfile
3+
// Docker manifest #{name}/Dockerfile
44
// ECR repository: #{name}
55

66
function(name) {
77
name: std.format('docker-%s', name),
88
on: {
99
push: {
10-
branches: ['master', 'test'],
10+
branches: ['main', 'test'],
1111
paths: [
12-
std.format('docker/%s/**', name),
12+
std.format('%s/**', name),
1313
std.format('.github/workflows/docker-%s.yml', name),
1414
],
1515
},
@@ -37,7 +37,7 @@ function(name) {
3737
{
3838
uses: 'docker/build-push-action@v3',
3939
with: {
40-
context: std.format('{{defaultContext}}:docker/%s', name),
40+
context: std.format('{{defaultContext}}:%s', name),
4141
platforms: std.join(',', ['linux/arm64']),
4242
tags: std.join(',', [
4343
std.format('${{ steps.login-ecr.outputs.registry }}/%s:${{ github.sha }}', name),

.github/workflows/docker-fluentd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"uses": "docker/build-push-action@v3",
3131
"with": {
32-
"context": "{{defaultContext}}:docker/fluentd",
32+
"context": "{{defaultContext}}:fluentd",
3333
"platforms": "linux/arm64",
3434
"push": true,
3535
"tags": "${{ steps.login-ecr.outputs.registry }}/fluentd:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/fluentd:latest"
@@ -42,11 +42,11 @@
4242
"on": {
4343
"push": {
4444
"branches": [
45-
"master",
45+
"main",
4646
"test"
4747
],
4848
"paths": [
49-
"docker/fluentd/**",
49+
"fluentd/**",
5050
".github/workflows/docker-fluentd.yml"
5151
]
5252
}

.github/workflows/docker-freeradius-exporter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"uses": "docker/build-push-action@v3",
3131
"with": {
32-
"context": "{{defaultContext}}:docker/freeradius-exporter",
32+
"context": "{{defaultContext}}:freeradius-exporter",
3333
"platforms": "linux/arm64",
3434
"push": true,
3535
"tags": "${{ steps.login-ecr.outputs.registry }}/freeradius-exporter:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/freeradius-exporter:latest"
@@ -42,11 +42,11 @@
4242
"on": {
4343
"push": {
4444
"branches": [
45-
"master",
45+
"main",
4646
"test"
4747
],
4848
"paths": [
49-
"docker/freeradius-exporter/**",
49+
"freeradius-exporter/**",
5050
".github/workflows/docker-freeradius-exporter.yml"
5151
]
5252
}

.github/workflows/docker-kea.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"uses": "docker/build-push-action@v3",
3131
"with": {
32-
"context": "{{defaultContext}}:docker/kea",
32+
"context": "{{defaultContext}}:kea",
3333
"platforms": "linux/arm64",
3434
"push": true,
3535
"tags": "${{ steps.login-ecr.outputs.registry }}/kea:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/kea:latest"
@@ -42,11 +42,11 @@
4242
"on": {
4343
"push": {
4444
"branches": [
45-
"master",
45+
"main",
4646
"test"
4747
],
4848
"paths": [
49-
"docker/kea/**",
49+
"kea/**",
5050
".github/workflows/docker-kea.yml"
5151
]
5252
}

.github/workflows/docker-radiusd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"uses": "docker/build-push-action@v3",
3131
"with": {
32-
"context": "{{defaultContext}}:docker/radiusd",
32+
"context": "{{defaultContext}}:radiusd",
3333
"platforms": "linux/arm64",
3434
"push": true,
3535
"tags": "${{ steps.login-ecr.outputs.registry }}/radiusd:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/radiusd:latest"
@@ -42,11 +42,11 @@
4242
"on": {
4343
"push": {
4444
"branches": [
45-
"master",
45+
"main",
4646
"test"
4747
],
4848
"paths": [
49-
"docker/radiusd/**",
49+
"radiusd/**",
5050
".github/workflows/docker-radiusd.yml"
5151
]
5252
}

.github/workflows/docker-s3tftpd-healthz.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"uses": "docker/build-push-action@v3",
3131
"with": {
32-
"context": "{{defaultContext}}:docker/s3tftpd-healthz",
32+
"context": "{{defaultContext}}:s3tftpd-healthz",
3333
"platforms": "linux/arm64",
3434
"push": true,
3535
"tags": "${{ steps.login-ecr.outputs.registry }}/s3tftpd-healthz:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/s3tftpd-healthz:latest"
@@ -42,11 +42,11 @@
4242
"on": {
4343
"push": {
4444
"branches": [
45-
"master",
45+
"main",
4646
"test"
4747
],
4848
"paths": [
49-
"docker/s3tftpd-healthz/**",
49+
"s3tftpd-healthz/**",
5050
".github/workflows/docker-s3tftpd-healthz.yml"
5151
]
5252
}

.github/workflows/docker-unbound.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"uses": "docker/build-push-action@v3",
3131
"with": {
32-
"context": "{{defaultContext}}:docker/unbound",
32+
"context": "{{defaultContext}}:unbound",
3333
"platforms": "linux/arm64",
3434
"push": true,
3535
"tags": "${{ steps.login-ecr.outputs.registry }}/unbound:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/unbound:latest"
@@ -42,11 +42,11 @@
4242
"on": {
4343
"push": {
4444
"branches": [
45-
"master",
45+
"main",
4646
"test"
4747
],
4848
"paths": [
49-
"docker/unbound/**",
49+
"unbound/**",
5050
".github/workflows/docker-unbound.yml"
5151
]
5252
}

gen-workflows.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
Dir.chdir(__dir__)
66

7+
jsonnet = system('jrsonnet', '--help', out: File::NULL, err: [:child, :out]) ? 'jrsonnet' : 'jsonnet'
8+
79
Dir["./.github/workflows/*.jsonnet"].each do |src|
810
dst = src.sub(/\.jsonnet$/, '.yml')
911
p [src => dst]
1012
FileUtils.mkdir_p File.dirname(dst)
1113

1214
File.open(dst, 'w') do |io|
13-
system('jsonnet', src, out: io, exception: true)
15+
system(jsonnet, src, out: io, exception: true)
1416
end
1517
end

0 commit comments

Comments
 (0)