Skip to content

Commit

Permalink
opt github action
Browse files Browse the repository at this point in the history
  • Loading branch information
zmisgod committed Jul 17, 2024
1 parent 715c0d6 commit 4402087
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Desktop
name: Create and publish a Desktop Tool

on:
push:
tags:
- "d*"
workflow_dispatch: # or just on button clicked

permissions:
contents: write
Expand Down Expand Up @@ -39,6 +38,7 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: setup node
uses: actions/setup-node@v1
with:
Expand All @@ -54,14 +54,17 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: install webkit2gtk (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: install app dependencies and build it
working-directory: ./iptv-checker-web
run: yarn && yarn build

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
name: Build and push docker image
name: Create and publish a Docker image to Docker Hub

on:
push:
tags:
- "v*"

env:
IMAGE_NAME: "zmisgod/iptvchecker"

jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- run: git fetch --prune --unshallow

- name: Setup Environments
id: envs
run: |
IPTVCHECKER_LATEST_TAG=$(git describe --tags --abbrev=0)
DOCKER_IMAGE="zmisgod/iptvchecker"
IPTVCHECKER_LATEST_TAG=${{github.ref_name}}
DOCKER_IMAGE=${{ env.IMAGE_NAME }}
echo "RELEASE_VERSION=${GITHUB_REF#refs}"
TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${IPTVCHECKER_LATEST_TAG}"
Expand All @@ -26,14 +31,17 @@ jobs:
mkdir iptv-checker && cp dockerfile iptv-checker/dockerfile
git clone https://github.com/zhimin-dev/iptv-checker-rs.git
git clone https://github.com/zhimin-dev/iptv-checker-web.git
- name: Setup Docker Buildx Command
id: buildx
uses: docker/setup-buildx-action@master

- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build Docker Image and Push
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -44,12 +52,14 @@ jobs:
file: iptv-checker/dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.envs.outputs.tags }}

- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: zmisgod/iptvchecker
repository: ${{ env.IMAGE_NAME }}
short-description: ${{ github.event.repository.description }}

- name: Image Digest
run: echo ${{ steps.docker_build.outputs.digest }}
10 changes: 7 additions & 3 deletions .github/workflows/docker-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- run: git fetch --prune --unshallow

- name: Setup Environments
id: envs
run: |
IPTVCHECKER_LATEST_TAG=$(git describe --tags --abbrev=0)
IPTVCHECKER_LATEST_TAG=${{github.ref_name}}
DOCKER_IMAGE=${{ github.repository }}
echo "RELEASE_VERSION=${GITHUB_REF#refs}"
Expand All @@ -30,15 +32,17 @@ jobs:
mkdir iptv-checker && cp dockerfile iptv-checker/dockerfile
git clone https://github.com/zhimin-dev/iptv-checker-rs.git
git clone https://github.com/zhimin-dev/iptv-checker-web.git
- name: Setup Docker Buildx Command
id: buildx
uses: docker/setup-buildx-action@master

- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker Image and Push
id: docker_build
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Rust
name: Create and publish a CMD tool

on:
push:
tags:
- "v*"
workflow_dispatch: # or just on button clicked

permissions:
contents: write
Expand Down

0 comments on commit 4402087

Please sign in to comment.