Skip to content

Commit

Permalink
readme, workflow, .(docker|git)ignore update.
Browse files Browse the repository at this point in the history
  • Loading branch information
JourneyOver committed Nov 3, 2024
1 parent b4921be commit 781c009
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 212 deletions.
34 changes: 29 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
/.git
/.github
/.idea
/.vscode
./resources/readme/*
# Directories to ignore
.git/
.github/
.idea/
.vscode/
node_modules/
resources/

# Ignore common archive and executable files
*.exe
*.zip
*.tar.gz
*.gz
*.tgz
*.rar
*.7z
*.jar

# Temporary or lock files
*.tmp
pnpm-lock.yaml
bun.lockb
package-lock.json

# Ignore configuration and script files
.gitignore
.env.template
.env
README.md
LICENSE

# Docker-specific files
Dockerfile
docker-compose.yml
67 changes: 0 additions & 67 deletions .github/workflows/docker-publish-dev.yml

This file was deleted.

64 changes: 6 additions & 58 deletions .github/workflows/docker-publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,13 @@ on:
tags:
- '*'

env:
PLATFORMS: linux/amd64,linux/arm64
TAG: latest

permissions:
packages: write

jobs:
main:
environment: release-docker
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@main
with:
show-progress: false
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Login to ghcr.io
uses: docker/login-action@master
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Prepare environment outputs
shell: sh
run: |
set -eu
echo "FIXED_TAG=$(echo ${{ github.ref }} | cut -d '/' -f 3)" >> "$GITHUB_ENV"
echo "DATE_ISO8601=$(date --iso-8601=seconds --utc)" >> "$GITHUB_ENV"
echo "GHCR_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile
uses: docker/build-push-action@master
with:
context: .
platforms: ${{ env.PLATFORMS }}
provenance: true
sbom: true
labels: |
org.opencontainers.image.created=${{ env.DATE_ISO8601 }}
org.opencontainers.image.version=${{ env.FIXED_TAG }}
org.opencontainers.image.revision=${{ github.sha }}
tags: |
ghcr.io/${{ env.GHCR_REPOSITORY }}:${{ env.TAG }}
ghcr.io/${{ env.GHCR_REPOSITORY }}:${{ env.FIXED_TAG }}
${{ env.DH_REPOSITORY }}:${{ env.TAG }}
${{ env.DH_REPOSITORY }}:${{ env.FIXED_TAG }}
push: true
call-reusable-workflow:
uses: JourneyDocker/github-workflows/.github/workflows/docker-publish.yml@main
with:
tag: latest
platforms: linux/amd64,linux/arm64
secrets: inherit
72 changes: 8 additions & 64 deletions .github/workflows/docker-publish-main.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,18 @@
name: Docker Publish Main

on:
workflow_dispatch:
push:
branches:
- main

env:
PLATFORMS: linux/amd64,linux/arm64
TAG: main
- main

permissions:
packages: write

jobs:
main:
environment: release-docker
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@main
with:
show-progress: false
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Login to ghcr.io
uses: docker/login-action@master
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Prepare environment outputs
shell: sh
run: |
set -eu
echo "DATE_ISO8601=$(date --iso-8601=seconds --utc)" >> "$GITHUB_ENV"
echo "GHCR_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile
uses: docker/build-push-action@master
with:
context: .
platforms: ${{ env.PLATFORMS }}
provenance: true
sbom: true
labels: |
org.opencontainers.image.created=${{ env.DATE_ISO8601 }}
org.opencontainers.image.version=${{ github.sha }}
org.opencontainers.image.revision=${{ github.sha }}
tags: |
ghcr.io/${{ env.GHCR_REPOSITORY }}:${{ env.TAG }}
${{ env.DH_REPOSITORY }}:${{ env.TAG }}
push: true

- name: Update DockerHub repository description
uses: peter-evans/dockerhub-description@main
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ env.DH_REPOSITORY }}
short-description: ${{ github.event.repository.description }}
call-reusable-workflow:
uses: JourneyDocker/github-workflows/.github/workflows/docker-publish.yml@main
with:
tag: main
platforms: linux/amd64,linux/arm64
secrets: inherit
15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
node_modules
storage
.env
/pnpm-lock.yaml
# Directories to ignore
node_modules/
storage/

# Temporary or lock files
*.tmp
pnpm-lock.yaml
bun.lockb
package-lock.json

# Ignore configuration files
.env
65 changes: 51 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,43 @@ node .

### Docker Installation

You can use pre-built Docker images to run ASFclaim:

**Pull the Docker Image:**

You can choose from two Docker image repositories:

- From Docker Hub:

```sh
journeyover/asfclaim:latest
```

- From GitHub Container Registry:

```sh
ghcr.io/journeydocker/asfclaim:latest
```

### Docker Image Tags

The `ASFclaim` Docker image is available in three primary tag formats, each suited to different use cases:

- **`main` (Continuous Development)**
- **Description**: The `main` tag is automatically updated to reflect the latest commit on the main branch in GitHub.
- **Usage Consideration**: This tag is not recommended for production use, as it changes frequently and may include untested or unstable updates. Use `main` only if you're contributing to development or need access to the latest features and fixes.
- **Frequency**: Updated with each new commit to the main branch, making this a rapidly evolving image.
> **Note**: Pulling the `main` tag may introduce breaking changes or instability, as it represents ongoing development work.
- **`latest` (Latest Stable Release)**
- **Description**: This tag points to the most recent stable release of `ASFclaim`. Unlike `main`, the `latest` tag is only updated with stable, fully-tested versions.
- **Usage Recommendation**: Use the `latest` tag if you want the most current stable build without specifying a particular version. Ideal for production environments where stability is critical.
- **`A.B.C.D` (Versioned Release)**
- **Description**: Versioned tags, such as `A.B.C.D`, are frozen at a specific release version and will not receive updates after publication.
- **Usage Recommendation**: Use versioned tags when you need consistency and want to avoid updates that might alter functionality. These tags are ideal for production environments requiring fixed versions.
#### Quick Start with Docker
```sh
Expand Down Expand Up @@ -95,20 +132,20 @@ services:
## Environment Variables
| ENV | Description | Info | Default Value | Required |
|-----------------------------|----------------------------------------------|--------------------------------------------------------|--------------------------------------|----------|
| `TZ` | Your timezone | Timezone identifier (e.g., `Europe/Amsterdam`) | `America/Chicago` | No |
| `ASF_PROTOCOL` | ASF IPC Transfer protocol | Options: `http` or `https` | `http` | No |
| `ASF_HOST` | ASF IPC Hostname or IP | Hostname or IP address | `localhost` | No |
| `ASF_PORT` | ASF IPC Port | Port number for IPC | `1242` | No |
| `ASF_PASS` | ASF IPC Password | Plaintext password for ASF | ` ` | No |
| `ASF_COMMAND_PREFIX` | Command prefix for ASF | Prefix used before commands | `!` | No |
| `ASF_BOTS` | List of ASF bot names | Comma-separated bot names | `asf` | No |
| `ASF_CLAIM_INTERVAL` | Hours to wait for execution | Interval in hours between checks | `6` | No |
| `GIST_ID` | Gist ID containing Steam codes | GitHub Gist ID for fetching codes | `e8c5cf365d816f2640242bf01d8d3675` | No |
| `WEBHOOK_URL` | Discord Webhook URL | URL for Discord webhook or `none` to disable | `none` | No |
| `WEBHOOK_ENABLEDTYPES` | Displayed notification types in Discord chat | Semicolon-separated types (e.g., `error;warn;success`) | `error;warn;success` | No |
| `WEBHOOK_SHOWACCOUNTSTATUS` | Show result from ASF | Options: `true` or `false` | `true` | No |
| ENV | Description | Info | Default Value | Required |
| --------------------------- | -------------------------------------------- | ------------------------------------------------------ | ---------------------------------- | -------- |
| `TZ` | Your timezone | Timezone identifier (e.g., `Europe/Amsterdam`) | `America/Chicago` | No |
| `ASF_PROTOCOL` | ASF IPC Transfer protocol | Options: `http` or `https` | `http` | No |
| `ASF_HOST` | ASF IPC Hostname or IP | Hostname or IP address | `localhost` | No |
| `ASF_PORT` | ASF IPC Port | Port number for IPC | `1242` | No |
| `ASF_PASS` | ASF IPC Password | Plaintext password for ASF | ` ` | No |
| `ASF_COMMAND_PREFIX` | Command prefix for ASF | Prefix used before commands | `!` | No |
| `ASF_BOTS` | List of ASF bot names | Comma-separated bot names | `asf` | No |
| `ASF_CLAIM_INTERVAL` | Hours to wait for execution | Interval in hours between checks | `6` | No |
| `GIST_ID` | Gist ID containing Steam codes | GitHub Gist ID for fetching codes | `e8c5cf365d816f2640242bf01d8d3675` | No |
| `WEBHOOK_URL` | Discord Webhook URL | URL for Discord webhook or `none` to disable | `none` | No |
| `WEBHOOK_ENABLEDTYPES` | Displayed notification types in Discord chat | Semicolon-separated types (e.g., `error;warn;success`) | `error;warn;success` | No |
| `WEBHOOK_SHOWACCOUNTSTATUS` | Show result from ASF | Options: `true` or `false` | `true` | No |
---
Expand Down

0 comments on commit 781c009

Please sign in to comment.