Fix update instructions #110
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: build package | |
on: [push] | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set env variables | |
run: if [[ $GITHUB_REF_TYPE == "tag" ]]; then echo "CUSTOM_REF=${GITHUB_REF_NAME}" >> $GITHUB_ENV; else echo "CUSTOM_REF=${GITHUB_SHA}" >> $GITHUB_ENV; fi | |
# Create package | |
- uses: actions/checkout@v4 | |
- name: WoltLab Suite Package Creation | |
uses: KittMedia/action-wsc-package-create@main | |
# Install SSH key | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
# Transfer file to remote server | |
- run: ssh ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }} "mkdir -p ${{ secrets.REMOTE_PATH_BASE }}/${{ github.event.repository.name }}/${{ env.CUSTOM_REF }}" | |
- run: scp ${{ github.event.repository.name }}.tar.gz ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:${{ secrets.REMOTE_PATH_BASE }}/${{ github.event.repository.name }}/${{ env.CUSTOM_REF }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}.tar.gz | |
path: ${{ github.event.repository.name }}.tar.gz | |
# Notification via Slack | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@master | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_USERNAME: ${{ github.event.repository.name }} | |
SLACK_ICON: https://avatars0.githubusercontent.com/u/75954244?s=200&v=4 | |
SLACK_TITLE: Download URL | |
SLACK_MESSAGE: https://git.kitt.media/${{ github.event.repository.name }}/${{ env.CUSTOM_REF }}/${{ github.event.repository.name }}.tar.gz | |
SLACK_FOOTER: '' | |
# Attach to artifacts | |
download: | |
name: Download Artifacts | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: release | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}.tar.gz |