Skip to content

Commit

Permalink
Merge pull request #8 from NetCoreTemplates/fix-kamal-release
Browse files Browse the repository at this point in the history
fix-kamal-release
  • Loading branch information
Layoric authored Nov 27, 2024
2 parents 96c5c07 + 285e42d commit b0341c9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,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 b0341c9

Please sign in to comment.