Skip to content
server

GitHub Action

YOURLS Action

0.3.1 Latest version

YOURLS Action

server

YOURLS Action

Load and dump Yourls Database

Installation

Copy and paste the following snippet into your .yml file.

              

- name: YOURLS Action

uses: cgs-earth/yourls-action@0.3.1

Learn more about this action in cgs-earth/yourls-action

Choose a version

yourls-action

Populate a YOURLS database via GitHub Actions

Build

The YOURLS Action is used to populate the YOURLS tables from a filesystem of CSVs.

This container is run during the Github workflow.

Description

The deployment is intended to run after the creation of a MySQL server with a valid YOURLS schema.

  • yourls-mysql is the Docker build a YOURLS deployment with for MySQL 5.7
  • yourls-action is the Docker build for the python package supporting the YOURLS population.
  • docker-compose.yml is the Docker compose setup for the two containers.

Usage

The basic workflow is to build the containers:

docker compose build

Then start start MySQL:

docker compose up -d mysql

Then run the yourls-action container to fill the database:

docker run \
    --rm \
    --name yourls-action \
    --network=yourls-action_default \
    --env YOURLS_DB_PASSWORD=${YOURLS_DB_PASSWORD:-arootpassword} \
    --env YOURLS_DB_USER=${YOURLS_DB_USER:-root} \
    --env YOURLS_DB_HOST=${YOURLS_DB_HOST:-mysql} \
    -v ./namespaces:/namespaces \
    yourls-action-yourls

Then generate a SQL dump of the database:

docker exec mysql sh /dump.sh | gzip > yourls.sql.gz