diff --git a/.github/workflows/coupon.yml b/.github/workflows/coupon.yml new file mode 100644 index 0000000..81705a2 --- /dev/null +++ b/.github/workflows/coupon.yml @@ -0,0 +1,54 @@ +name: Uber Eats and Foodpanda coupon + +on: + schedule: + - cron: "0 */24 * * *" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + pip install -r requirements.txt + + - name: Run coupon code + run: | + python coupon-script/ubereats-coupon.py + python coupon-script/foodpanda-coupon.py + + - name: Generate coupon md + run: | + python coupon-script/readme.py + + - name: Configure git + run: | + git config --global user.name "${{ vars.GITUSERNAME }}" + git config --global user.email "${{ vars.GITUSEREMAIL }}" + + - name: Commit and push changes + run: | + if git diff-index --quiet HEAD --; then + echo "No changes detected." + else + git add . + git commit -m "chore: update coupon" + fi + continue-on-error: true + + - name: Push changes + uses: ad-m/github-push-action@master + with: + branch: main + github_token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/README.md b/README.md index 01f338c..bb1739e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Tasty Coupon -### Uber Eats 優惠碼丨外送優惠 2024 年 01 月 5 日 +### Uber Eats 優惠碼丨外送優惠 2024 年 01 月 7 日 | 優惠內容 | 優惠代碼 | 優惠期間 | 適用範圍 | | --- | --- | --- | --- | |**訂閱會員優惠碼** : ```滿$100享4折最高可折$300可用2次```|```一月生鮮```|```~2024/1/22```|```生鮮雜貨首購```| @@ -40,7 +40,7 @@ |**特選餐廳優惠** : ```午茉綠買一送一```|```無```|```送完為止```|```再睡五分鐘```| |**特選餐廳優惠** : ```滿$300折$45```|```無```|```兌完為止```|```MisterDount```| -### foodpanda 優惠碼丨熊貓 外送優惠 2024 年 01 月 5 日 +### foodpanda 優惠碼丨熊貓 外送優惠 2024 年 01 月 7 日 | 優惠內容 | 優惠代碼 | 優惠期間 | 適用範圍 | | --- | --- | --- | --- | |**訂閱會員優惠碼** : ```訂閱年費3折```|```PRO3```|```用完為止```|```非訂閱用戶```| @@ -81,7 +81,6 @@ |**生鮮雜貨優惠碼** : ```大杯經典系列大杯特濃系列大杯極選系列買2送1```|```無```|```週一到週四```|```全家便利商店```| |**生鮮雜貨優惠碼** : ```大杯經典系列大杯特濃系列大杯極選系列買2送2```|```無```|```週五到週日```|```全家便利商店```| |**生鮮雜貨優惠碼** : ```滿$799享84折最高折抵$300每人限用1次```|```一袋一袋買```|```~2024/1/31```|```熊貓超市指定分店```| -|**生鮮雜貨優惠碼** : ```滿$649享75折最高折抵$300每人可用1次```|```一袋一袋煮```|```2024/1/6限定```|```熊貓超市指定分店```| |**生鮮雜貨優惠碼** : ```滿$649享75折最高折抵$300每人可用1次```|```一袋一袋洗```|```2024/1/13限定```|```熊貓超市指定分店```| |**生鮮雜貨優惠碼** : ```滿$649享75折最高折抵$300每人可用1次```|```一袋一袋拆```|```2024/1/20限定```|```熊貓超市指定分店```| |**生鮮雜貨優惠碼** : ```滿$699享82折最高折抵$200每人限用1次```|```一袋一袋掃```|```~2024/2/1```|```生鮮雜貨指定店家```| diff --git a/asset/md/foodpanda-table.md b/asset/md/foodpanda-table.md index 4d000c5..ad61f6e 100644 --- a/asset/md/foodpanda-table.md +++ b/asset/md/foodpanda-table.md @@ -1,5 +1,5 @@ -### foodpanda 優惠碼丨熊貓 外送優惠 2024 年 01 月 5 日 +### foodpanda 優惠碼丨熊貓 外送優惠 2024 年 01 月 7 日 | 優惠內容 | 優惠代碼 | 優惠期間 | 適用範圍 | | --- | --- | --- | --- | |**訂閱會員優惠碼** : ```訂閱年費3折```|```PRO3```|```用完為止```|```非訂閱用戶```| @@ -40,7 +40,6 @@ |**生鮮雜貨優惠碼** : ```大杯經典系列大杯特濃系列大杯極選系列買2送1```|```無```|```週一到週四```|```全家便利商店```| |**生鮮雜貨優惠碼** : ```大杯經典系列大杯特濃系列大杯極選系列買2送2```|```無```|```週五到週日```|```全家便利商店```| |**生鮮雜貨優惠碼** : ```滿$799享84折最高折抵$300每人限用1次```|```一袋一袋買```|```~2024/1/31```|```熊貓超市指定分店```| -|**生鮮雜貨優惠碼** : ```滿$649享75折最高折抵$300每人可用1次```|```一袋一袋煮```|```2024/1/6限定```|```熊貓超市指定分店```| |**生鮮雜貨優惠碼** : ```滿$649享75折最高折抵$300每人可用1次```|```一袋一袋洗```|```2024/1/13限定```|```熊貓超市指定分店```| |**生鮮雜貨優惠碼** : ```滿$649享75折最高折抵$300每人可用1次```|```一袋一袋拆```|```2024/1/20限定```|```熊貓超市指定分店```| |**生鮮雜貨優惠碼** : ```滿$699享82折最高折抵$200每人限用1次```|```一袋一袋掃```|```~2024/2/1```|```生鮮雜貨指定店家```| diff --git a/asset/md/ubereats-table.md b/asset/md/ubereats-table.md index 953ffbd..b1b796c 100644 --- a/asset/md/ubereats-table.md +++ b/asset/md/ubereats-table.md @@ -1,5 +1,5 @@ -### Uber Eats 優惠碼丨外送優惠 2024 年 01 月 5 日 +### Uber Eats 優惠碼丨外送優惠 2024 年 01 月 7 日 | 優惠內容 | 優惠代碼 | 優惠期間 | 適用範圍 | | --- | --- | --- | --- | |**訂閱會員優惠碼** : ```滿$100享4折最高可折$300可用2次```|```一月生鮮```|```~2024/1/22```|```生鮮雜貨首購```| diff --git a/coupon-json/foodpanda-coupon.json b/coupon-json/foodpanda-coupon.json index 919c68c..2aacd77 100644 --- a/coupon-json/foodpanda-coupon.json +++ b/coupon-json/foodpanda-coupon.json @@ -1,5 +1,5 @@ { - "foodpanda 優惠碼丨熊貓 外送優惠 2024 年 01 月 5 日 ": { + "foodpanda 優惠碼丨熊貓 外送優惠 2024 年 01 月 7 日 ": { "訂閱會員 優惠碼": [ { "優惠內容": "訂閱 年費3折", @@ -237,12 +237,6 @@ "優惠期間": "~ 2024/1/31", "適用範圍": "熊貓超市 指定分店" }, - { - "優惠內容": "滿 $649 享 75 折最高折抵 $300每人可用 1 次", - "優惠代碼": "一袋一袋煮", - "優惠期間": "2024/1/6 限定", - "適用範圍": "熊貓超市 指定分店" - }, { "優惠內容": "滿 $649 享 75 折最高折抵 $300每人可用 1 次", "優惠代碼": "一袋一袋洗", diff --git a/coupon-json/ubereats-coupon.json b/coupon-json/ubereats-coupon.json index 6c3e968..194ff19 100644 --- a/coupon-json/ubereats-coupon.json +++ b/coupon-json/ubereats-coupon.json @@ -1,5 +1,5 @@ { - "Uber Eats 優惠碼丨外送優惠 2024 年 01 月 5 日 ": { + "Uber Eats 優惠碼丨外送優惠 2024 年 01 月 7 日 ": { "訂閱會員 優惠碼": [ { "優惠內容": "滿 $100 享 4 折最高可折 $300可用2次",