update sheel #46
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
# For more details, read this: https://coolify.io/docs/github-actions | |
name: Build Static Image | |
on: | |
push: | |
branches: ["main"] | |
env: | |
IMAGE_NAME: "portfolio" | |
jobs: | |
setup-warp: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cloudflare WARP | |
run: | | |
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg | |
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list | |
sudo apt update && sudo apt install cloudflare-warp | |
shell: bash | |
- name: Config Cloudflare WARP | |
working-directory: scripts | |
run: | | |
./cf-build-config.sh mdm.xml ${{ secrets.CLOUDFLARE_ORGANIZATION_ID }} ${{ secrets.CF_ID }} ${{ secrets.CF_SECRET }} ${{ secrets.CLOUDFLARE_WARP_TOKEN }} | |
sudo mv mdm.xml /var/lib/cloudflare-warp/ | |
sudo mkdir -p /run/dbus | |
sudo dbus-daemon --config-file=/usr/share/dbus-1/system.conf | |
sudo systemctl restart warp-svc.service | |
./cf-warp-pre-connect.sh -m 10 | |
warp-cli --accept-tos connect | |
shell: bash | |
- name: Validate Cloudflare WARP Config | |
run: | | |
warp-cli --accept-tos registration show | |
warp-cli --accept-tos status | |
shell: bash | |
- name: Login to registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.REGISTRY_URL }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image and push to registry | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: | | |
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:latest | |
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ github.sha }} |