UUP Download Ubuntu #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UUP Download Ubuntu | |
on: | |
workflow_dispatch: | |
inputs: | |
file-name: | |
description: 'upload the zip package to this repo.' | |
required: true | |
default: '' | |
artifacts: | |
description: "Upload to Github Artifact" | |
required: true | |
default: "false" | |
jobs: | |
Download: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Preparing for the environment | |
run: | | |
sudo apt-get install aria2 zip unzip cabextract wimtools chntpw genisoimage | |
- name: Unzip | |
run: | | |
unzip ${{ github.event.inputs.file-name }} | |
- name: run | |
run: | | |
sudo chmod 777 uup_download_linux.sh | |
sudo bash uup_download_linux.sh | |
ls -a | |
- name: Upload | |
uses: actions/upload-artifact@main | |
if: github.event.inputs.artifacts == 'true' | |
with: | |
name: ${{ github.event.inputs.file-name }} | |
path: ./*.ISO | |
- name: Zip | |
run: | | |
mkdir isos | |
sha256sum *.ISO > ./isos/${{ github.event.inputs.file-name }}.sha256 | |
cat ./isos/${{ github.event.inputs.file-name }}.sha256 | |
zip -r iso.zip *.ISO | |
zip -s 1g iso.zip --out ./isos/${{ github.event.inputs.file-name }}.zip | |
- name: Create a release | |
uses: softprops/action-gh-release@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: false | |
prerelease: false | |
tag_name: ${{ github.event.inputs.file-name }} | |
name: ${{ github.event.inputs.file-name }} | |
body_path: ./isos/${{ github.event.inputs.file-name }}.sha256 | |
files: ./isos/* | |