github cli
install
1 | sudo dnf install 'dnf-command(config-manager)' |
security
create/check gh_token
1
2github网站设置
settings/Developer Settings/Personal access tokens (classic)
senario
1
2
3
4
5
6senario 1 在git push的时候,输入password的时候,直接复制上面的tokens即可
senario 2 在workflow中使用
gh secret set SECRET_NAME
or
gh secret set SECRET_NAME < secret.txt
use
1
2
3
4
5
6
7
8
9
10login
gh auth login
set
gh secret set DOCKERHUB_USERNAME
gh secret set DOCKERHUB_TOKEN
gh secret set GH_TOKEN
check
gh secret list
workflow
GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline.
home
1
2
3
4
5
6
7
8
9
10情况一
runs-on: ubuntu-latest
HOME=/home/runner/work/<projectName>/<projectName>
情况二
runs-on: ubuntu-latest
container: dingodatabase/dingo-eureka:rocky9
HOME=/__w/<projectName>/<projectName>disk usage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25情况一:
runs-on: ubuntu-latest
Filesystem Size Used Avail Use% Mounted on
/dev/root 72G 47G 26G 65% /
tmpfs 3.9G 84K 3.9G 1% /dev/shm
tmpfs 1.6G 1.1M 1.6G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda16 881M 59M 761M 8% /boot
/dev/sda15 105M 6.1M 99M 6% /boot/efi
tmpfs 794M 12K 794M 1% /run/user/1001
情况二:
runs-on: ubuntu-latest
container: dingodatabase/dingo-eureka:rocky9
Filesystem Size Used Avail Use% Mounted on
overlay 73G 60G 14G 82% /
tmpfs 64M 0 64M 0% /dev
shm 64M 0 64M 0% /dev/shm
/dev/root 73G 60G 14G 82% /__w
tmpfs 1.6G 1.2M 1.6G 1% /run/docker.sock
tmpfs 3.9G 0 3.9G 0% /proc/acpi
tmpfs 3.9G 0 3.9G 0% /proc/scsi
tmpfs 3.9G 0 3.9G 0% /sys/firmwareevent
env
1
2
3GITHUB_OUTPUT
GITHUB_STATE
GITHUB_ENV
action
- docker/metadata-action
制作镜像tag
1 | - name: Docker meta |
如果修改内容为:
1 | tags: | |
适配main和其他分支
1 | tags: | |
best practices
https
- 使用 https 协议拉取项目代码
1 | git config credential.helper cache |
ISSUES
- search
searchKeyWord is:issue is:closed repo:Alamofire/Alamofire
这条搜索,searchKeyWord是搜索关键字, is:issue
表示我们要搜索 issue, is:closed
表示已经关闭的 issue, repo:Alamofire/Alamofire
表示我们只搜索这个仓库范围的 issue