Update release.yaml
This commit is contained in:
parent
4684954d27
commit
8adf08fb0d
44
.github/workflows/release.yaml
vendored
44
.github/workflows/release.yaml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
release:
|
||||
runs-on: ${{ github.event.inputs.type }}
|
||||
env:
|
||||
OUTPUTFILE: /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}/apks/ChromePublic.apk
|
||||
OUTPUTFILE: /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
|
||||
APK: ${{ github.event.inputs.build }}_ChromePublic.apk
|
||||
HTTPS_PROXY: $PROXY_ADDR
|
||||
|
||||
@ -45,25 +45,35 @@ jobs:
|
||||
- name: Copy artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
sudo cp ${{ env.OUTPUTFILE }} ChromePublic.apk
|
||||
sudo cp ${{ env.OUTPUTFILE }}/apks/ChromePublic.apk ChromePublic.apk
|
||||
sudo chown runner ChromePublic.apk
|
||||
mv ChromePublic.apk $APK
|
||||
|
||||
- name: Enable proxy on container
|
||||
- name: Create release
|
||||
shell: bash
|
||||
run: |
|
||||
if ! [[ -z "${HTTP_PROXY}" ]]; then
|
||||
PROXY_ADDR=http://$(hostname -I | cut -d' ' -f1 | xargs):8118
|
||||
echo "PROXY_ADDR=$PROXY_ADDR" >> $GITHUB_ENV
|
||||
sudo iptables -D INPUT -p tcp -s localhost --dport 8118 -j ACCEPT
|
||||
sudo iptables -D INPUT -p tcp --dport 8118 -j DROP
|
||||
fi
|
||||
wget https://github.com/cli/cli/releases/download/v2.4.0/gh_2.4.0_linux_amd64.tar.gz
|
||||
tar xfz gh_2.4.0_linux_amd64.tar.gz
|
||||
|
||||
- name: Release build ${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: true
|
||||
body: Apk for ${{ env.APK }} sha ${{ github.event.inputs.sha }}
|
||||
files: ${{ env.APK }}
|
||||
env:
|
||||
HTTP_PROXY: ${{ env.PROXY_ADDR }}
|
||||
VERSION=v$(cat ${{ env.OUTPUTFILE }}/RELEASE)-${{ github.event.inputs.build }}
|
||||
gh_2.4.0_linux_amd64/bin/gh release create $VERSION \
|
||||
$APK --notes ""
|
||||
|
||||
# - name: Enable proxy on container
|
||||
# shell: bash
|
||||
# run: |
|
||||
# if ! [[ -z "${HTTP_PROXY}" ]]; then
|
||||
# PROXY_ADDR=http://$(hostname -I | cut -d' ' -f1 | xargs):8118
|
||||
# echo "PROXY_ADDR=$PROXY_ADDR" >> $GITHUB_ENV
|
||||
# sudo iptables -D INPUT -p tcp -s localhost --dport 8118 -j ACCEPT
|
||||
# sudo iptables -D INPUT -p tcp --dport 8118 -j DROP
|
||||
# fi
|
||||
|
||||
# - name: Release build ${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# with:
|
||||
# draft: true
|
||||
# body: Apk for ${{ env.APK }} sha ${{ github.event.inputs.sha }}
|
||||
# files: ${{ env.APK }}
|
||||
# env:
|
||||
# HTTP_PROXY: ${{ env.PROXY_ADDR }}
|
||||
|
Loading…
Reference in New Issue
Block a user