Skip to content

Commit

Permalink
fix-kamal-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Nov 27, 2024
1 parent 46bcc6d commit 8c877ed
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ permissions:
on:
workflow_run:
workflows: ["Build Container"]
branches:
- main
- master
types:
- completed
branches:
Expand Down Expand Up @@ -92,16 +89,20 @@ jobs:
kamal deploy -q -P --version latest || true
else
echo "Not first run, skipping kamal app boot"
fi
fi
- name: Ensure file permissions
run: kamal server exec --no-interactive "mkdir -p /opt/docker/${{ env.repository_name }}/App_Data && chown -R 1654:1654 /opt/docker/${{ env.repository_name }}"
run: |
kamal server exec --no-interactive "mkdir -p /opt/docker/${{ env.repository_name }}/App_Data && chown -R 1654:1654 /opt/docker/${{ env.repository_name }}"
- name: Migration
if: env.HAS_MIGRATIONS == 'true'
run: kamal app exec --no-reuse --no-interactive --version=latest "--AppTasks=migrate"
run: |
kamal server exec --no-interactive 'echo "${{ env.KAMAL_REGISTRY_PASSWORD }}" | docker login ghcr.io -u ${{ env.KAMAL_REGISTRY_USERNAME }} --password-stdin'
kamal server exec --no-interactive "docker pull ghcr.io/${{ env.image_repository_name }}:latest || true"
kamal app exec --no-reuse --no-interactive --version=latest "--AppTasks=migrate"
- name: Deploy with Kamal
run: |
kamal lock release -v
kamal deploy -P --version latest
kamal deploy -P --version latest

0 comments on commit 8c877ed

Please sign in to comment.