Update build.yml permissions again #7
Workflow file for this run
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: Github CI build | |
# GITHUB_REF_NAME in the form of release-$VERSION-$RELEASE-$EXTRA_NAME | |
on: | |
push: | |
tags: | |
- release-**-**-** | |
env: | |
RELEASESDK: 4.4.0.68 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare | |
run: | | |
mkdir output | |
- name: Build mic | |
run: | | |
export VERSION=$(echo $GITHUB_REF_NAME | cut -d "-" -f 2) | |
export RELEASE=$(echo $GITHUB_REF_NAME | cut -d "-" -f 3) | |
export EXTRA_NAME=-$(echo $GITHUB_REF_NAME | cut -d "-" -f 4-) | |
docker run --rm --privileged -v $PWD:/share --env-file env.list -e VERSION -e RELEASE -e EXTRA_NAME coderus/sailfishos-platform-sdk:$RELEASESDK /bin/bash -c " | |
mkdir -p build ; | |
cd build ; | |
cp -r /share/. . ; | |
sudo zypper -n in kmod | |
./scripts/create-image.sh --release $RELEASE --version $VERSION | |
sudo cp -r mic/. /share/output/mic" | |
- name: Update release | |
run: | | |
gh release upload ${{ github.ref_name }} output/mic/sfe-*/*.zip --clobber | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |