Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Package mosdns into ipk #500

Package mosdns into ipk

Package mosdns into ipk #500

Workflow file for this run

name: Package mosdns into ipk
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * *"
push:
jobs:
check-release:
outputs:
need_update: ${{ steps.version.outputs.tag_name != steps.mosdns-version.outputs.tag_name }}
tag_name: ${{ steps.mosdns-version.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- name: Check latest release's tag name
id: version
uses: fangqiuming/latest-release-version@v1.2.0-beta
with:
include_pre: 'true'
- name: Check mosdns's latest release's tag name
id: mosdns-version
uses: fangqiuming/latest-release-version@v1.2.0-beta
with:
repository: IrineSistiana/mosdns
package-ipk:
needs: check-release
if: needs.check-release.outputs.need_update == 'true'
runs-on: ubuntu-latest
steps:
- run: |
TAG_NAME=${{ needs.check-release.outputs.tag_name }}
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "PACKAGE_NAME=mosdns" >> $GITHUB_ENV
echo "DISTRIB_ARCH=x86_64" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Collect files
shell: bash
run: ./collect.sh
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit and push changes
run: |
git add mosdns/*
if [[ $(git status -s | wc -l) -gt 0 ]]; then
git commit -S -m "Auto update for mosdns ${{ env.TAG_NAME }}"
git push
fi
- name: Package .ipk
shell: bash
run: ./package.sh
- name: Release and upload assets
uses: softprops/action-gh-release@v0.1.14
with:
name: ${{ env.TAG_NAME }}
tag_name: ${{ env.TAG_NAME }}
body: Openwrt x86_64 .ipk package of mosdns ${{ env.TAG_NAME }}(https://github.com/IrineSistiana/mosdns/releases/tag/${{ env.TAG_NAME }})
files: ${{ env.PACKAGE_OUTPUT_PATH }}
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true