This commit is contained in:
parent
93eb243167
commit
a099c6fec6
1 changed files with 4 additions and 45 deletions
|
@ -11,44 +11,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup environment
|
||||
run: |
|
||||
echo "Running as user: $(whoami)"
|
||||
echo "Current filesystem permissions:"
|
||||
mount | grep -E 'overlay|tmpfs'
|
||||
|
||||
if mount | grep -q "/ .*ro"; then
|
||||
echo "Attempting to remount root filesystem as read-write"
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
sudo mount -o remount,rw /
|
||||
else
|
||||
mount -o remount,rw /
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Install and setup Docker
|
||||
run: |
|
||||
CMD_PREFIX=""
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
CMD_PREFIX="sudo"
|
||||
fi
|
||||
|
||||
$CMD_PREFIX apt-get update
|
||||
$CMD_PREFIX apt-get install -y docker.io curl
|
||||
$CMD_PREFIX service docker start
|
||||
|
||||
timeout 15 sh -c "until docker info; do sleep 1; done"
|
||||
|
||||
echo "GITHUB_REPOSITORY_OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV
|
||||
echo "GITHUB_REPOSITORY_NAME=${{ github.repository_name }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Docker buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
|
@ -62,14 +24,11 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.neur0tx.site/${{ env.GITHUB_REPOSITORY_OWNER }}/${{ env.GITHUB_REPOSITORY_NAME }}:latest
|
||||
tags: git.neur0tx.site/${{ github.repository_owner }}/${{ github.repository_name }}:latest
|
||||
|
||||
- name: Deploy
|
||||
if: ${{ success() }}
|
||||
run: |
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get install -y curl
|
||||
elif command -v apk >/dev/null 2>&1; then
|
||||
apk add --no-cache curl
|
||||
fi
|
||||
curl -H "${{ secrets.DEPLOYER_AUTH }}" ${{ secrets.DEPLOYER_URL }}
|
||||
apt-get install -y --no-install-recommends curl
|
||||
curl -H "${{ secrets.DEPLOYER_AUTH }}" ${{ secrets.DEPLOYER_URL }}
|
||||
container: alpine:latest
|
Loading…
Add table
Reference in a new issue