test ip #48
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: | |
build: | |
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 | |
ip addr | |
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: 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 }} |