Manage your DNS from GitHub with DNSControl

In this post Sven Luijten uses DNSControl from within GitHub Actions to manage DNS:

What if you could edit a JavaScript file with your desired DNS configuration, submit a pull request on GitHub, see a preview of the changes you are about to make, and when you merge it, have those changes be applied completely automatically?

The main action behind it is koenrh/dnscontrol-action:

# .github/workflows/push.yml
name: Push DNS changes

      - main

    runs-on: ubuntu-latest
      - uses: actions/checkout@v2

      - name: Push DNS changes
        uses: koenrh/dnscontrol-action@v3
          args: push

The action also supports more arguments — as covered in Sven’s post — for checking and previewing.

Manage your DNS from GitHub with DNSControl →

Super fast npm install on Github Actions

The folks at Voorhoede share how they integrated the actions/cache@v2 build step into their GitHub Workflow so that it caches npm install results.

Super fast npm install on Github Actions →

Running GitHub Actions for Certain Commit Messages

Ryan Chandler shares how to configure your GitHub Actions Workflow in such a way that they skip a build when a certain word appears in the commit message.

    runs-on: ubuntu-latest
    if: "! contains(github.event.head_commit.message, 'nobuild')"

You can also flip it around, to only build whenever a specific word is present.

Running GitHub Actions for Certain Commit Messages →

Via Freek

Automatically update your GitHub readme through GitHub Actions

Pawel Grzybek has set up a workflow that uses GitHub Actions’ Scheduled Events to automatically update his profile It runs every 6 hours and pulls in his RSS feed to populate the

import fs from "fs";
import fetch from "node-fetch";
import parser from "xml2json";

const FEED_URL = "";
const TAG_OPEN = `<!-- FEED-START -->`;
const TAG_CLOSE = `<!-- FEED-END -->`;

const fetchArticles = async () => {
  const articles = await fetch(FEED_URL);
  const articlesText = await articles.text();
  const articlesJSON = parser.toJson(articlesText);
  const newC = JSON.parse(articlesJSON), 5);

  return{ title, link }) => `- [${title}](${link})`).join("\n");

async function main() {
  const readme = fs.readFileSync("./", "utf8");
  const indexBefore = readme.indexOf(TAG_OPEN) + TAG_OPEN.length;
  const indexAfter = readme.indexOf(TAG_CLOSE);
  const readmeContentChunkBreakBefore = readme.substring(0, indexBefore);
  const readmeContentChunkBreakAfter = readme.substring(indexAfter);

  const posts = await fetchArticles();

  const readmeNew = `

  fs.writeFileSync("./", readmeNew.trim());

try {
} catch (error) {

Fetch most recent posts to your GitHub profile page using GitHub workflow and Node.js →

💡 People have been doing lots of nice stuff with their README’s. There’s a curated list to be found at matiassingers/awesome-readme (and plenty of others if you search for them)