Skip to content

Commit 1f52512

Browse files
committed
feat: update github action
Signed-off-by: STRRL <[email protected]>
1 parent ff6886e commit 1f52512

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

.github/workflows/upload_image.yaml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,6 @@ on:
77
types: [published]
88

99
jobs:
10-
build-coredns:
11-
strategy:
12-
matrix:
13-
arch: [amd64, arm64]
14-
runs-on: ${{ fromJson('{"amd64":"ubuntu-latest", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
15-
16-
container:
17-
image: golang:1.13
18-
19-
steps:
20-
- name: Clone CoreDNS
21-
run: |
22-
apt update -y && apt install git make -y
23-
24-
git clone https://github.com/coredns/coredns.git .
25-
git checkout 7d5f5b87a4fb310d442f7ef0d52e3fead0e10d39
26-
sed -i 's/stable/buster/g' Dockerfile
27-
28-
- uses: actions/checkout@v3
29-
with:
30-
path: 'plugin/k8s_dns_chaos'
31-
32-
- name: Build Chaos CoreDNS
33-
run: |
34-
echo "k8s_dns_chaos:github.com/chaos-mesh/k8s_dns_chaos" >> plugin.cfg
35-
# TODO: replace with the local repo, not stuck with a certain commit
36-
go mod edit -require github.com/chaos-mesh/k8s_dns_chaos@649fd5298a454eb59b6080fd670e7f7ea1f5b1b4
37-
SWAGGER=1 UI=1 make coredns
38-
39-
- name: upload coredns binary
40-
uses: actions/upload-artifact@v2
41-
with:
42-
name: coredns-${{ matrix.arch }}
43-
path: coredns
44-
retention-days: 7
45-
4610
build-docker-image:
4711
strategy:
4812
matrix:
@@ -70,29 +34,12 @@ jobs:
7034
username: ${{ github.actor }}
7135
password: ${{ secrets.GITHUB_TOKEN }}
7236

73-
- name: Clone CoreDNS
74-
run: |
75-
apt update -y && apt install git make -y
76-
77-
git clone https://github.com/coredns/coredns.git .
78-
git checkout 7d5f5b87a4fb310d442f7ef0d52e3fead0e10d39
79-
sed -i 's/stable/buster/g' Dockerfile
80-
81-
- name: Download coredns binary
82-
uses: actions/download-artifact@v2
83-
with:
84-
name: coredns-${{ matrix.arch }}
85-
path: coredns-artifacts
86-
8737
- name: Build Chaos CoreDNS Image
8838
env:
8939
IMAGE_TAG: ${{ steps.image_tag.outputs.image_tag }}
9040
ARCH: ${{ matrix.arch }}
9141
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
9242
run: |
93-
# permissions would be lost after transfer by github artifacts, see: https://github.com/chaos-mesh/k8s_dns_chaos/issues/20
94-
chmod +x coredns-artifacts/coredns
95-
mv coredns-artifacts/coredns coredns
9643
docker build -t ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/chaos-coredns:$IMAGE_TAG-$ARCH .
9744
9845
- name: Upload Chaos CoreDNS

0 commit comments

Comments
 (0)