ci: 移除GitHub配置文件并简化CI工作流

移除不再使用的GitHub配置文件,包括ISSUE_TEMPLATE和FUNDING.yml。同时,简化了CI工作流,移除了与版本标签相关的复杂逻辑,并将Docker镜像名称更改为woodchen/firefox。此外,将构建环境更新为ubuntu-latest,并优化了构建步骤。
This commit is contained in:
wood chen 2025-03-20 18:12:19 +08:00
parent 9e00c0a557
commit 9e7c32b6e8
5 changed files with 12 additions and 227 deletions

12
.github/FUNDING.yml vendored
View File

@ -1,12 +0,0 @@
# These are supported funding model platforms
github: jlesage
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://paypal.me/JocelynLeSage", "https://www.tesla.com/referral/jocelyn4590"]

View File

@ -1,93 +0,0 @@
name: Bug report
description: File a bug report.
title: "[Bug] Provide a short description of the bug here"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
Provide details about the host running the container.
Examples:
- Operating system (e.g. Ubuntu, Windows, TrueNAS, openmediavault, unRAID, etc).
- Version of the operating system.
- CPU architecture (x86-64, arm, arm64, etc).
- Model of the device, if applicable (e.g. Raspberry Pi 4B, Synology DS418, QNAP TS-364, etc).
- The Docker version (output of `docker version`).
- Anything else specific to your environment. Examples:
- Network share (NFS, CIFS) mapped to the container.
- Docker running in LXC container.
- etc.
- If applicable, how the UI provided by the container is access:
- Browser (Chrome, Firefox, Edge, etc).
- Version of the browser.
- OS of the browser.
- Is the container accessed through a reverse proxy.
- etc.
value: |
- OS:
- OS version:
- CPU:
- Docker version:
- Device model:
- Browser/OS:
validations:
required: false
- type: textarea
attributes:
label: Container creation
description: |
How did you create the container ?
Examples:
- The `docker run` command used.
- The compose file used.
- Screenshots of the management tool UI (e.g. Portainer, unRAID, etc) showing container settings.
validations:
required: true
- type: textarea
attributes:
label: Container log
description: Please copy/paste the output of `docker logs <container name>`.
render: text
validations:
required: true
- type: textarea
attributes:
label: Container inspect
description: |
If the container is running, please provide the output of `docker inspect <container name>`.
**Attention**: If you defined passwords, secrets or any sensitive information via environment variables, make sure to remove them from the output.
render: text
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Anything that will give more context about the issue you are encountering.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false

View File

@ -1,8 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question, discuss
url: https://github.com/jlesage/docker-firefox/discussions
about: Get help using this Docker container.
- name: Documentation
url: https://github.com/jlesage/docker-firefox#readme
about: Documentation about this Docker container.

View File

@ -1,16 +0,0 @@
name: Feature request
description: Suggest an idea for this project.
title: "[Feature request] Provide a short description of the feature here"
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an idea to make this project better.
- type: textarea
attributes:
label: Idea
description: |
Please describe the desired behavior, pitch your idea, or suggest improvements.
validations:
required: true

View File

@ -5,21 +5,18 @@ concurrency:
cancel-in-progress: true
env:
DOCKER_IMAGE_NAME: jlesage/firefox
DOCKER_IMAGE_NAME: woodchen/firefox
PLATFORMS: linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8
on:
push:
branches: '*'
tags:
- v[0-9][0-9].[0-9][0-9].[0-9]+
- v[0-9][0-9].[0-9][0-9].[0-9]+-pre.[0-9]+
pull_request:
jobs:
build:
name: Build image
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Free disk space
@ -36,61 +33,20 @@ jobs:
- name: Prepare
id: prep
run: |
# Determine the Docker container version.
VERSION=unknown
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
# Git tag pushed: use tag as the version.
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF =~ refs/heads/* ]]; then
# Git commit pushed: use the commit SHA as the version.
VERSION=${GITHUB_SHA::8}
elif [[ $GITHUB_REF =~ refs/pull/* ]]; then
# Pull request: use PR number as the version.
VERSION=pr-${{ github.event.number }}
else
echo "::error::Unexpected GITHUB_REF: $GITHUB_REF"
exit 1
fi
# Determine the version to put in container label.
LABEL_VERSION=${VERSION}
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
# Do not include the starting 'v' of the version.
LABEL_VERSION=${VERSION:1}
fi
# Determine the Docker container tags.
TAGS="${{ env.DOCKER_IMAGE_NAME }}:${VERSION}"
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
fi
TAGS="$TAGS,$(echo $TAGS | tr ',' '\n' | sed 's|^|ghcr.io/|' | tr '\n' ',')"
# Determine the release type.
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
IS_RELEASE=yes
if [[ $GITHUB_REF =~ -pre\.[0-9]+ ]]; then
RELEASE_TYPE="pre"
else
RELEASE_TYPE="standard"
fi
else
IS_RELEASE=no
RELEASE_TYPE="n/a"
fi
# Set Docker container tag to latest
TAGS="${{ env.DOCKER_IMAGE_NAME }}:latest"
# Print results.
echo "::group::Results"
echo "Github reference: $GITHUB_REF"
echo "Release: $IS_RELEASE"
echo "Release type: $RELEASE_TYPE"
echo "Docker container version: $VERSION"
echo "Docker container version label: $LABEL_VERSION"
echo "Docker container tag(s): $TAGS"
echo "::endgroup::"
# Export outputs.
echo "is_release=${IS_RELEASE}" >> $GITHUB_OUTPUT
echo "release_type=${RELEASE_TYPE}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "label_version=${LABEL_VERSION}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
#echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
@ -101,60 +57,18 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: ${{ steps.prep.outputs.is_release == 'yes' }}
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
if: ${{ steps.prep.outputs.is_release == 'yes' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: ${{ steps.prep.outputs.is_release == 'yes' }}
provenance: false
context: .
push: github.ref == 'refs/heads/main'
platforms: ${{ env.PLATFORMS }}
tags: ${{ steps.prep.outputs.tags }}
build-args: |
DOCKER_IMAGE_VERSION=${{ steps.prep.outputs.label_version }}
cache-from: type=gha,scope=${{ env.DOCKER_IMAGE_NAME }}
cache-to: type=gha,mode=max,scope=${{ env.DOCKER_IMAGE_NAME }}
- name: Inspect
if: ${{ steps.prep.outputs.is_release == 'yes' }}
run: |
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE_NAME }}:${{ steps.prep.outputs.version }}
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.prep.outputs.release_type == 'standard' }}
- name: Dockerhub description
if: ${{ steps.prep.outputs.release_type == 'standard' }}
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.DOCKER_IMAGE_NAME }}
readme-filepath: DOCKERHUB.md
notification:
name: Notification
needs: [ build ]
runs-on: ubuntu-20.04
if: ${{ always() && github.event_name != 'pull_request' }}
steps:
- name: Pushover notification
uses: desiderati/github-action-pushover@v1
with:
job-status: ${{ needs.build.result }}
pushover-api-token: ${{ secrets.PUSHOVER_API_TOKEN }}
pushover-user-key: ${{ secrets.PUSHOVER_USER_KEY }}