gh-action

Author, debug, and extend GitHub Actions CI/CD workflows for Docker, npm, Android, and Flutter deployments.

3|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/ZHLX2005/sl --skill gh-action-zhlx2005
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-action
Source: https://github.com/ZHLX2005/sl/tree/main/skills/gh-action
Command: npx skills add https://github.com/ZHLX2005/sl --skill gh-action-zhlx2005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing and debugging GitHub Actions workflows involves recurring pitfalls: GHCR authentication failures, docker compose not pulling refreshed :latest tags, APK signature drift in CI, and stuck workflow runs. This Skill provides copy-ready workflow templates and a gh CLI troubleshooting runbook that address these failure modes directly. ## Core Features & Use Cases - Deploy Templates: Two deploy.yml variants — a GHCR-based pipeline (Docker build, push, SSH deploy with compose) and a registry-free pipeline (docker save, SCP, docker load) for servers with slow registry access. - Publishing & Signing: An npm-publish.yml template with idempotent tag/version checks and --provenance signing, plus an Android release-signing template that fixes SHA fingerprint drift by ordering keystore setup before the build step. - Flutter Web Deployment: A flutter build web to nginx Docker image pipeline with gh CLI secret setup and an end-to-end verification SOP. - Troubleshooting Runbook: gh CLI commands for fetching raw logs, canceling stuck runs, diagnosing GHCR 401 errors, and checking server-side container state. - Use Case: Your deploy workflow shows green but the server still runs the old container. Load the gh-troubleshoot reference to identify the docker compose pull caching issue and apply the --force-recreate fix. ## Quick Start Ask the AI to write a GitHub Actions deploy workflow that builds a Docker image and deploys it to your server over SSH without using a container registry.

Frequently Asked Questions about gh-action

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Docker image to a server with GitHub Actions?

Use a workflow that builds the image, pushes it to GHCR, then runs docker compose pull and up -d --force-recreate over SSH via appleboy/ssh-action. For servers with slow registry access, use docker save, SCP the tarball, and docker load on the server instead.

How to publish an npm package automatically on push to main?

Create an npm-publish.yml workflow that reads the version from package.json, checks whether the git tag and npm version already exist, creates the tag if missing, and runs npm publish --provenance --access public with an NPM_TOKEN Automation-type secret.

Why does docker compose up -d not pull the new latest image?

docker compose up -d reuses the locally cached image digest when the tag already exists, even if GHCR's :latest points to a new SHA. Run docker compose pull explicitly before up -d, and add --force-recreate to rebuild containers from the new image.

Why does my Android APK signature change every CI build?

The build falls back to a debug signature because the release keystore is missing or the keystore preparation step runs after the build step. Configure the four keystore secrets, place the Prepare keystore step before any build command, and verify the SHA-256 fingerprint after building.

How do I debug a stuck or failed GitHub Actions run with gh CLI?

Use gh run list and gh run view --log-failed to inspect failures, gh run cancel to stop stuck runs, and gh api to fetch raw job logs when the CLI reports a job still in progress. Grep logs for error, denied, 401, and exit patterns to isolate the cause.

When should I avoid the docker save and SCP deployment approach?

Avoid it for multi-service stacks, images larger than roughly 500 MB, or servers with limited disk, since every deploy loads a complete image without layer reuse. Use the GHCR-based template with docker compose pull when the server has fast registry access.