Skip to content

Instantly share code, notes, and snippets.

View nerdCopter's full-sized avatar

nerdCopter nerdCopter

View GitHub Profile
@nerdCopter
nerdCopter / purging-old-artifacts-with-github-api.md
Created March 7, 2022 20:23 — forked from lelegard/purging-old-artifacts-with-github-api.md
Purging old artifacts with GitHub Actions API

With GitHub Actions, a workflow can publish artifacts, typically logs or binaries. As of early 2020, the life time of an artifact is hard-coded to 90 days (this may change in the future). After 90 days, an artifact is automatically deleted. But, in the meantime, artifacts for a repository may accumulate and generate mega-bytes or even giga-bytes of data files.

It is unclear if there is a size limit for the total accumulated size of artifacts for a public repository. But GitHub cannot reasonably let multi-giga-bytes of artifacts data accumulate without doing anything. So, if your workflows regularly produce large artifacts (such as "nightly build" procedures for instance), it is wise to cleanup and delete older artifacts without waiting for the 90 days limit.

Using the Web page for the "Actions" of a repository, it is possible to browse old workflow runs and manually delete artifacts. But the procedure is slow and tedious. It is fine to delete one selected artifact. It is not for a regular cleanup. We need

@nerdCopter
nerdCopter / install-gcc-4.9.4.sh
Last active April 8, 2023 18:14 — forked from jtilly/install-gcc-4.9.3.sh
Install GCC 4.9.4
#!/bin/bash
# this script installs GCC 4.9.4
# to use it navigate to your home directory and type:
# sh install-gcc-4.9.4.sh
# download and install gcc 4.9.4
wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.gz
tar xzf gcc-4.9.4.tar.gz
cd gcc-4.9.4
@nerdCopter
nerdCopter / README.md
Created August 24, 2023 20:25 — forked from robertpainsi/README.md
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :