Skip to content

Update docker-packages.yml #24

Update docker-packages.yml

Update docker-packages.yml #24

Workflow file for this run

name: Build Docker Images
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=${{github.ref_name}}
DOCKER_IMAGE=${{ env.IMAGE_NAME }}
echo "RELEASE_VERSION=${GITHUB_REF#refs}"
TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${IPTVCHECKER_LATEST_TAG}"
echo "IPTVCHECKER_LATEST_TAG:${IPTVCHECKER_LATEST_TAG}"
echo ::set-output name=tags::${TAGS}
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-ui-interface.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
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
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: ${{ env.IMAGE_NAME }}
short-description: ${{ github.event.repository.description }}
- name: Image Digest
run: echo ${{ steps.docker_build.outputs.digest }}