Skip to content

Commit

Permalink
change docker build permission (#1901)
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>

Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango authored Dec 16, 2022
1 parent 1257ef7 commit 0dbeb46
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 20 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/dockers-agent-ngt-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,42 @@ on:
- "dockers/agent/core/ngt/Dockerfile"
- "versions/GO_VERSION"
- "versions/NGT_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-agent-ngt-image.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/agent/core/ngt/**"
- "cmd/agent/core/ngt/**"
- "dockers/agent/core/ngt/Dockerfile"
- "versions/GO_VERSION"
- "versions/NGT_VERSION"

jobs:
build:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/dockers-agent-sidecar-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,42 @@ on:
- "cmd/agent/sidecar/**"
- "dockers/agent/sidecar/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-agent-sidecar-image.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/db/**"
- "internal/db/storage/blob/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/agent/sidecar/**"
- "cmd/agent/sidecar/**"
- "dockers/agent/sidecar/Dockerfile"
- "versions/GO_VERSION"

jobs:
build:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/dockers-ci-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,35 @@ on:
- "Makefile.d/**"
- "versions/GO_VERSION"
- "versions/NGT_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-ci-container-image.yml"
- "dockers/ci/**"
- "Makefile"
- "Makefile.d/**"
- "versions/GO_VERSION"
- "versions/NGT_VERSION"

jobs:
build:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/dockers-dev-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ on:
- ".github/workflows/dockers-dev-container-image.yml"
- "dockers/ci/**"
- "dockers/dev/**"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-dev-container-image.yml"
- "dockers/ci/**"
- "dockers/dev/**"
schedule:
- cron: "0 1 * * *"

Expand All @@ -37,18 +44,19 @@ jobs:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/dockers-discoverer-k8s-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,40 @@ on:
- "cmd/discoverer/k8s/**"
- "dockers/discoverer/k8s/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-discoverer-k8s-image.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/db/**"
- "apis/grpc/**"
- "pkg/discoverer/k8s/**"
- "cmd/discoverer/k8s/**"
- "dockers/discoverer/k8s/Dockerfile"
- "versions/GO_VERSION"

jobs:
build:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/dockers-gateway-filter-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,43 @@ on:
- "pkg/gateway/internal/**"
- "dockers/gateway/filter/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-gateway-filter-image.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/**/*_mock.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/gateway/filter/**"
- "cmd/gateway/filter/**"
- "pkg/gateway/internal/**"
- "dockers/gateway/filter/Dockerfile"
- "versions/GO_VERSION"

jobs:
build:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Cache Docker layers
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/dockers-gateway-lb-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,43 @@ on:
- "pkg/gateway/internal/**"
- "dockers/gateway/lb/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-gateway-lb-image.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/**/*_mock.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/gateway/lb/**"
- "cmd/gateway/lb/**"
- "pkg/gateway/internal/**"
- "dockers/gateway/lb/Dockerfile"
- "versions/GO_VERSION"

jobs:
build:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/dockers-helm-operator-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,38 @@ on:
- "charts/vald-helm-operator/values.yaml"
- "charts/vald-helm-operator/templates/**"
- "versions/OPERATOR_SDK_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-helm-operator-image.yml"
- "dockers/operator/helm/Dockerfile"
- "charts/vald/Chart.yaml"
- "charts/vald/values.yaml"
- "charts/vald/templates/**"
- "charts/vald-helm-operator/Chart.yaml"
- "charts/vald-helm-operator/values.yaml"
- "charts/vald-helm-operator/templates/**"
- "versions/OPERATOR_SDK_VERSION"

jobs:
build:
strategy:
max-parallel: 4
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/dockers-loadtest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,27 @@ on:
- "cmd/tools/cli/loadtest/**"
- "dockers/tools/cli/loadtest/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
types: [labeled]
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-loadtest-image.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/tools/cli/loadtest/**"
- "cmd/tools/cli/loadtest/**"
- "dockers/tools/cli/loadtest/Dockerfile"
- "versions/GO_VERSION"

jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) }}
strategy:
max-parallel: 4
steps:
Expand All @@ -64,12 +81,12 @@ jobs:
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: "--debug"
- name: Login to DockerHub
Expand Down
Loading

0 comments on commit 0dbeb46

Please sign in to comment.