Skip to content

feat: add opts to composeAppsWithStoreInfo (#189) #164

feat: add opts to composeAppsWithStoreInfo (#189)

feat: add opts to composeAppsWithStoreInfo (#189) #164

name: Auto Publish Website
on:
push:
branches:
- main
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: isntall git
run: sudo apt install --yes git
- name: git global
run: sudo git config --global --add safe.directory '*'
- name: set version
run: sudo git tag v99.99.99-alpha
-
name: Fetch all tags
run: sudo git fetch --force --tags
- name: Get version
id: get_version
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo "VERSION=$(git describe --abbrev=0 --tags | awk -F- '{print $1}')" >> $GITHUB_ENV
- name: show version
id: show_version
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo ${{env.VERSION}}
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: 1.14.1
args: release --rm-dist --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- name: remove migration file
run: find . -type f \( -name '*migration*' \) -delete
- name: install sshpass
run: sudo apt install sshpass --yes
- name: ZeroTier
uses: zerotier/github-action@v1.0.1
with:
network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}
- name: ping host
shell: bash
run: |
count=10
while ! ping -c 1 10.147.18.11 ; do
echo "waiting..." ;
sleep 1 ;
let count=count-1
done
echo "ping success"
- name: copy tar to target host
shell: bash
run: |
sshpass -p "${{ secrets.ssh_password }}" scp -r -o StrictHostKeyChecking=no -P 22 ./dist/*.gz root@10.147.18.11:/var/www/download
echo "ping success"
# - name: send message
# run: |
# curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"text","content":{"text":"CasaOS-AppManagement updated"}}' ${{ secrets.SSH_ROBOT_URL }}
- name: Error Handling
if: ${{ failure() }}
run: |
curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"text","content":{"text":"CasaOS-AppManagement push Error"}}' ${{ secrets.SSH_ROBOT_URL }}