www/.gitea/workflows/earthly.yml
Xe Iaso 7a60f17f2a
remove JS
Signed-off-by: Xe Iaso <me@xeiaso.net>
2024-09-20 18:05:07 -04:00

60 lines
2.0 KiB
YAML

name: Gitea Actions CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
name: Build and deploy
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
EARTHLY_DISABLE_REMOTE_REGISTRY_PROXY: "1"
steps:
- name: install earthly
run: |
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://pkg.earthly.dev/earthly.pgp | sudo gpg --dearmor -o /usr/share/keyrings/earthly-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/earthly-archive-keyring.gpg] https://pkg.earthly.dev/deb \
stable main" | sudo tee /etc/apt/sources.list.d/earthly.list > /dev/null
sudo apt-get update
sudo apt-get install -y earthly
- uses: actions/checkout@v4
- name: docker login # to avoid dockerhub rate-limiting
run: docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_PASSWORD }}"
- name: log into ghcr.io
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: xe
password: ${{ secrets.GHCR_TOKEN }}
- name: use sat alpha
run: |
earthly org select me-2625
earthly sat select alpha
docker info
env
- name: build www image
run: earthly --push +run
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
KUBE_CONTEXT: ${{ secrets.KUBE_CONTEXT }}
with:
args: apply -k manifest
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
KUBE_CONTEXT: ${{ secrets.KUBE_CONTEXT }}
with:
args: rollout restart -n default deployment/techaro-lol