Skip to content

Commit

Permalink
Update Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-cq committed Mar 24, 2024
1 parent 54cf2f8 commit 4522295
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/alist-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ jobs:
./alist/data
- name: Install Grafana Agent
if: secrets.GRAFANA_AGENT_CONFIG
run: |
cat > /etc/grafana-agent.yaml << EOF
env:
GRAFANA_AGENT_CONFIG: ${{ secrets.GRAFANA_AGENT_CONFIG }}
run: |
sudo cat > /etc/grafana-agent.yaml << EOF
${{ secrets.GRAFANA_AGENT_CONFIG }}
EOF
if grep -q "instance: <your-instance-name>" /etc/grafana-agent.yaml; then
echo "GRAFANA_AGENT_CONFIG is not set. Skip Grafana Agent Installation."
exit 0
fi
sed -i "s/instance: <your-instance-name>/instance: ${_ALIST_SYNC_NAME}/g" /etc/grafana-agent.yaml
sed -i "s#<your-log-path>#$(pwd)/logs/*.log#g" /etc/grafana-agent.yaml
Expand Down

0 comments on commit 4522295

Please sign in to comment.