change build script

This commit is contained in:
hikari 2023-10-11 15:03:23 +03:30 committed by GitHub
parent bc799d15bb
commit a8e3b30c2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,17 @@
# This workflow will build an Arch Linux ISO file when a release is created. # This workflow will build an Arch Linux ISO file with the commit on it
name: build parchiso per release name: build parchiso per release
on: on:
release: release:
types: types:
- created - created
env:
api_key: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.event.repository.name }}
release_name: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
jobs: jobs:
build: build:
permissions:
contents: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: archlinux:latest image: archlinux:latest
@ -16,18 +19,14 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Packages via Pacman - name: Install Packages via Pacman
run: | run: pacman -Sy; pacman --noconfirm -S git archiso python python-pygithub github-cli reflector p7zip
pacman -Suy --noconfirm --noprogressbar - name: Change Arch docker mirror
pacman -Sy --noconfirm --noprogressbar --needed git archiso python python-pygithub reflector run: reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
- name: Change pacman mirrors
run: |
reflector -n 3 --protocol https --save /etc/pacman.d/mirrorlist
pacman -Syy
- name: Build image - name: Build image
run: mkarchiso -v iso/ run: mkarchiso -v iso/
- name: Upload iso to the release - name: Upload iso to the release
env: run: |
API_KEY: ${{ secrets.GITHUB_TOKEN }} cd ./out
REPO_NAME: ${{ github.repository }} 7z -v500m a "$(ls *.iso)".zip "$(ls *.iso)"
RELEASE_NAME: ${{ github.ref_name }} md5sum * > md5sums.txt
run: python tools/upload_asset.py gh release upload ${{ github.event.release.tag_name }} * -R ${{ github.repository }}