ntzyz's space

∠( ᐛ 」∠)_

Category

  • Algorithm
  • Figures
  • Gameplay
  • Linux
  • Network
  • Other
  • Photos
  • Web

Tags

  • Linux
  • JavaScript
  • PS4
  • A6300
  • A7M3
  • HTML5
  • OpenWrt
  • FE55
  • 手办
  • systemd
  • Web
  • Tunnel
  • Arcaea
  • iptables
  • Network
  • node
  • 雪
  • VPN
  • 狗
  • 猫
  • PowerShell
  • AudioContext
  • MediaSource
  • IPv6
  • SQLite
  • NVMe
  • Gaming
  • CSharp
  • Routing
  • LeetCode
  • PPTP
  • HDOJ
  • MHW
  • USB
  • FromSoftware
  • Highlight.js
  • FE24105G
  • CI
  • Algorithm
  • VR
  • HTML
  • Arch Linux
  • WireGuard
  • SVP
  • Minecraft
  • Highcharts.js
  • SDL
  • CAPCOM
  • Sekiro
  • GitHub
  • UEFI
  • iSCSI
  • WebAssembly
  • MPV
  • UglifyJS
  • MySQL
  • PHP
  • NAT
  • Surface
  • Node

Recent replies

  • 张建新 发表于「在浏览器中使用 WebAssembly 解码 MP3 并播放」
  • 张建新 发表于「在浏览器中使用 WebAssembly 解码 MP3 并播放」
  • Dingles 发表于「个人网络配置方案」
  • 竹林里有冰 发表于「用 Elastic Stack 拯救 Telegram 的中文搜索」
  • spinmry 发表于「CoreMark WebAssembly」
  • spinmry 发表于「CoreMark WebAssembly」
  • ntzyz 发表于「CoreMark WebAssembly」
  • Hatsuroku 发表于「CoreMark WebAssembly」
  • Kyle 发表于「用 Elastic Stack 拯救 Telegram 的中文搜索」
  • ShellBin 发表于「Cinebench」

Links

About me
WordPress 存档
Cinebench 跑分记录
Coremark WebAssembly 跑分记录
Hpoi 手办维基 个人页
ZephRay
>Lithia's Core
业余无线电台 BD4SUR
Ferrets 家的 Wordpress
spinmry实验室
notonokodds
春上冰月的博客
kasora's blog
蒋炜成 | 个人博客
Test2g
447f.Misaka
Project RC
Shell Bin
标签:CI

尝试使用 Github Actions

2019 年 11 月 14 日分类:Other#GitHub#CI

其实这个叫 GitHub Actions 的持续集成已经上线很久了,在刚刚公开测试时我就尝试去使用,结果翻来翻去没找到 MongoDB 数据库的项目应该如何配置基础环境 不要问我当时为什么用了 MongoDB,我现在非常后悔(雾)。今天摸鱼的时候突然想到 Actions 支持 Docker,Docker 又能快速的启动一个 MongoDB 官方提供的容器,那么这就好办了,直接对着自己的博客下手,来试一试这个工具。

在仓库首页里点击 Actions 标签进入配置页面,并直接创建一个新的 Node CI 类型的 Workflow,这样就能获得一个适用于 node.js 项目的配置模版。和 Travis 一样,Actions 的模版配置也是使用 YAML 格式,写起来比 JSON 舒服多了。之后只需要在 steps 中添加以下内容即可启动一个 MongoDB 容器:

- name: Launch MongoDB
  run: |
    sudo docker container run --name mongo -v $PWD:/src -p 27017:27017 -d mongo
    sleep 4s
- name: Import initial database
  run: |
    sudo docker container ls --all
    sudo docker container exec mongo mongo localhost/newBlog /src/db.default.js
MORE
  • «
  • 1
  • »
Copyright © 2016-2019 ntzyz. All rights reserved.
Except where otherwise noted, content on this blog is licensed under CC-BY 2.0.