Skip to content

Commit 1cb4b9b

Browse files
authored
all: upd github (1)
1 parent 261c8ff commit 1cb4b9b

36 files changed

Lines changed: 534 additions & 534 deletions

.codecov.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
vendor/** binary
1+
* text=auto eol=lf

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @AdGuardSoftwareLimited/go

.github/workflows/build.yaml

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO(a.garipov): Refactor this workflow.
12
name: Build
23
# Permissions are disabled for all the jobs by default, and then overridden for
34
# specific jobs if needed. This is a recommended practice for security reasons,
@@ -6,16 +7,18 @@ name: Build
67
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions.
78
'permissions': {}
89
'env':
9-
'GO_VERSION': '1.26.3'
10+
'GO_VERSION': '1.26.4'
1011
'on':
1112
'push':
1213
'tags':
1314
- 'v*'
1415
'branches':
1516
- '*'
16-
'pull_request':
17+
'pull_request': null
1718
jobs:
1819
tests:
20+
'if': |
21+
${{ github.repository_owner != 'AdGuardSoftwareLimited' }}
1922
'permissions':
2023
'contents': 'read'
2124
runs-on: ${{ matrix.os }}
@@ -32,21 +35,14 @@ jobs:
3235
#
3336
# See https://github.com/actions/checkout/issues/485#issuecomment-934422611.
3437
'persist-credentials': false
35-
- uses: actions/setup-go@v2
38+
- uses: actions/setup-go@v6
3639
with:
3740
go-version: '${{ env.GO_VERSION }}'
3841
- name: Run tests
39-
env:
40-
CI: "1"
41-
run: |-
42-
make test
43-
- name: Upload coverage
44-
uses: codecov/codecov-action@v1
45-
if: "success() && matrix.os == 'ubuntu-latest'"
46-
with:
47-
token: ${{ secrets.CODECOV_TOKEN }}
48-
file: ./coverage.txt
42+
run: 'make test'
4943
build:
44+
'if': |
45+
${{ github.repository_owner != 'AdGuardSoftwareLimited' }}
5046
needs:
5147
- tests
5248
'permissions':
@@ -60,7 +56,7 @@ jobs:
6056
#
6157
# See https://github.com/actions/checkout/issues/485#issuecomment-934422611.
6258
'persist-credentials': false
63-
- uses: actions/setup-go@v2
59+
- uses: actions/setup-go@v6
6460
with:
6561
go-version: '${{ env.GO_VERSION }}'
6662
- name: Build release
@@ -83,36 +79,10 @@ jobs:
8379
prerelease: false
8480
- name: Upload
8581
if: startsWith(github.ref, 'refs/tags/v')
86-
uses: xresloader/upload-to-github-release@v1.3.12
82+
uses: xresloader/upload-to-github-release@v1.6.2
8783
env:
8884
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8985
with:
9086
file: "build/dnsproxy-*.tar.gz;build/dnsproxy-*.zip"
9187
tags: true
9288
draft: false
93-
notify:
94-
needs:
95-
- build
96-
if: |
97-
${{ always() &&
98-
(
99-
github.event_name == 'push' ||
100-
github.event.pull_request.head.repo.full_name == github.repository
101-
)
102-
}}
103-
'permissions':
104-
# Required by workflow-conclusion-action to check workflow status.
105-
'actions': 'read'
106-
'contents': 'read'
107-
runs-on: ubuntu-latest
108-
steps:
109-
- name: Conclusion
110-
uses: technote-space/workflow-conclusion-action@v1
111-
- name: Send Slack notif
112-
uses: 8398a7/action-slack@v3
113-
with:
114-
status: ${{ env.WORKFLOW_CONCLUSION }}
115-
fields: workflow, repo, message, commit, author, eventName,ref
116-
env:
117-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/docker.yaml

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO(a.garipov): Refactor this workflow.
12
'name': Docker
23
# Permissions are disabled for all the jobs by default, and then overridden for
34
# specific jobs if needed. This is a recommended practice for security reasons,
@@ -6,7 +7,7 @@
67
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions.
78
'permissions': {}
89
'env':
9-
'GO_VERSION': '1.26.3'
10+
'GO_VERSION': '1.26.4'
1011
'on':
1112
'push':
1213
'tags':
@@ -16,6 +17,8 @@
1617
- 'master'
1718
'jobs':
1819
'docker':
20+
'if': |
21+
${{ github.repository_owner != 'AdGuardSoftwareLimited' }}
1922
'permissions':
2023
'contents': 'read'
2124
'runs-on': 'ubuntu-latest'
@@ -28,7 +31,7 @@
2831
# See https://github.com/actions/checkout/issues/485#issuecomment-934422611.
2932
'persist-credentials': false
3033
- 'name': 'Set up Go'
31-
'uses': 'actions/setup-go@v3'
34+
'uses': 'actions/setup-go@v6'
3235
'with':
3336
'go-version': '${{ env.GO_VERSION }}'
3437
- 'name': 'Set up Go modules cache'
@@ -51,37 +54,13 @@
5154
set -e -u -x
5255
5356
docker login \
54-
-u="${DOCKER_USER}" \
55-
-p="${DOCKER_PASSWORD}"
57+
-u="${DOCKER_USER}" \
58+
-p="${DOCKER_PASSWORD}" \
59+
;
5660
5761
make \
58-
DOCKER_IMAGE_NAME="adguard/dnsproxy" \
59-
DOCKER_PUSH="1" \
60-
VERBOSE="1" \
61-
docker
62-
'notify':
63-
'needs':
64-
- 'docker'
65-
'if': |
66-
${{ always() &&
67-
(
68-
github.event_name == 'push' ||
69-
github.event.pull_request.head.repo.full_name == github.repository
70-
)
71-
}}
72-
'permissions':
73-
# Required by workflow-conclusion-action to check workflow status.
74-
'actions': 'read'
75-
'contents': 'read'
76-
'runs-on': ubuntu-latest
77-
'steps':
78-
- 'name': Conclusion
79-
'uses': technote-space/workflow-conclusion-action@v1
80-
- 'name': Send Slack notif
81-
'uses': 8398a7/action-slack@v3
82-
'with':
83-
'status': ${{ env.WORKFLOW_CONCLUSION }}
84-
'fields': workflow, repo, message, commit, author, eventName,ref
85-
'env':
86-
'GITHUB_TOKEN': ${{ secrets.GITHUB_TOKEN }}
87-
'SLACK_WEBHOOK_URL': ${{ secrets.SLACK_WEBHOOK_URL }}
62+
DOCKER_IMAGE_NAME='adguard/dnsproxy' \
63+
DOCKER_PUSH='1' \
64+
VERBOSE='1' \
65+
docker \
66+
;

.github/workflows/lint.yaml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO(a.garipov): Refactor this workflow.
12
'name': 'lint'
23
# Permissions are disabled for all the jobs by default, and then overridden for
34
# specific jobs if needed. This is a recommended practice for security reasons,
@@ -6,16 +7,18 @@
67
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions.
78
'permissions': {}
89
'env':
9-
'GO_VERSION': '1.26.3'
10+
'GO_VERSION': '1.26.4'
1011
'on':
1112
'push':
1213
'tags':
1314
- 'v*'
1415
'branches':
1516
- '*'
16-
'pull_request':
17+
'pull_request': null
1718
'jobs':
1819
'go-lint':
20+
'if': |
21+
${{ github.repository_owner != 'AdGuardSoftwareLimited' }}
1922
'permissions':
2023
'contents': 'read'
2124
'runs-on': 'ubuntu-latest'
@@ -27,41 +30,8 @@
2730
# See https://github.com/actions/checkout/issues/485#issuecomment-934422611.
2831
'persist-credentials': false
2932
- 'name': 'Set up Go'
30-
'uses': 'actions/setup-go@v3'
33+
'uses': 'actions/setup-go@v6'
3134
'with':
3235
'go-version': '${{ env.GO_VERSION }}'
3336
- 'name': 'run-lint'
3437
'run': 'make go-deps go-lint'
35-
'notify':
36-
'needs':
37-
- 'go-lint'
38-
# Secrets are not passed to workflows that are triggered by a pull request
39-
# from a fork.
40-
#
41-
# Use always() to signal to the runner that this job must run even if the
42-
# previous ones failed.
43-
'if': |
44-
${{
45-
always() &&
46-
github.repository_owner == 'AdguardTeam' &&
47-
(
48-
github.event_name == 'push' ||
49-
github.event.pull_request.head.repo.full_name == github.repository
50-
)
51-
}}
52-
'permissions':
53-
# Required by workflow-conclusion-action to check workflow status.
54-
'actions': 'read'
55-
'contents': 'read'
56-
'runs-on': 'ubuntu-latest'
57-
'steps':
58-
- 'name': 'Conclusion'
59-
'uses': 'technote-space/workflow-conclusion-action@v1'
60-
- 'name': 'Send Slack notif'
61-
'uses': '8398a7/action-slack@v3'
62-
'with':
63-
'status': '${{ env.WORKFLOW_CONCLUSION }}'
64-
'fields': 'workflow, repo, message, commit, author, eventName, ref'
65-
'env':
66-
'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
67-
'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'

.github/workflows/mirror.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'jobs':
2+
'mirror':
3+
'if': |
4+
${{ github.repository_owner == 'AdGuardSoftwareLimited' }}
5+
'permissions':
6+
'actions': 'write'
7+
'contents': 'read'
8+
'id-token': 'write'
9+
'uses': 'AdGuardSoftwareLimited/actions/.github/workflows/mirror.yml@master'
10+
'with':
11+
'disable_workflows_source': 'build.yaml docker.yaml lint.yaml'
12+
'disable_workflows_target': 'mirror.yaml private.yaml'
13+
'target_repo': 'git@github.com:AdguardTeam/dnsproxy.git'
14+
'team': 'go'
15+
'name': 'Mirror'
16+
'on':
17+
'push':
18+
'branches': ['master']
19+
# Permissions are disabled for all the jobs by default, and then overridden for
20+
# specific jobs if needed. This is a recommended practice for security reasons,
21+
# and also allows to avoid mistakes with permissions when creating new jobs.
22+
#
23+
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions.
24+
'permissions': {}

0 commit comments

Comments
 (0)