Skip to content

Update

Update #203

Workflow file for this run

name: Update
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 18 * * 0"
jobs:
Update_mirror:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +%d.%m.%Y)"
- name: Update with wget
continue-on-error: true
run: |
rm -rf docs.samsungknox.com
wget -m -np -E -k -p -e robots=off --restrict-file-names=windows https://docs.samsungknox.com
- name: Create archive
run: |
tar acf 'docs.samsungknox.com_${{ steps.date.outputs.date }}.tar' docs.samsungknox.com
zstd --ultra -22 'docs.samsungknox.com_${{ steps.date.outputs.date }}.tar'
- name: Archive file
uses: actions/upload-artifact@v4
with:
name: 'docs.samsungknox.com_${{ steps.date.outputs.date }}'
path: 'docs.samsungknox.com_${{ steps.date.outputs.date }}.tar.zst'
- name: Remove unnecessary files
run: |
find . -name '*.apk' -delete
rm -rf docs.samsungknox.com_${{ steps.date.outputs.date }}.tar.zst docs.samsungknox.com_${{ steps.date.outputs.date }}.tar
- name: Add files and commit
uses: EndBug/add-and-commit@v9
with:
author_name: github-actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'Update ${{ steps.date.outputs.date }}'
add: '.'
- name: Update badge
uses: RubbaBoy/BYOB@v1.2.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NAME: Update
ICON: 'https://raw.githubusercontent.com/google/material-design-icons/master/src/action/update/materialicons/24px.svg'
LABEL: 'Updated at'
COLOR: 00FF00
STATUS: ${{ steps.date.outputs.date }} UTC