From c9dd5aef5302a709bd8ad3fcf7b1d231606b05c0 Mon Sep 17 00:00:00 2001 From: Mindfang Date: Mon, 22 Jan 2024 14:50:23 -0600 Subject: [PATCH] Add subfolder watching --- .gitea/workflows/SteamCMD-Installer.yml | 55 +++++++++++++++++++++++++ .gitea/workflows/SteamCMD.yml | 2 + 2 files changed, 57 insertions(+) create mode 100644 .gitea/workflows/SteamCMD-Installer.yml diff --git a/.gitea/workflows/SteamCMD-Installer.yml b/.gitea/workflows/SteamCMD-Installer.yml new file mode 100644 index 0000000..e4c4d13 --- /dev/null +++ b/.gitea/workflows/SteamCMD-Installer.yml @@ -0,0 +1,55 @@ +name: Build on Commit +run-name: Build + +on: + push: + branches: + - "main" + paths: + - "SteamCMD-Installer/*" + # schedule: + # - cron: "37 18 * * *" + +env: + REGISTRY: gitea.taco.quest + IMAGE_NAME: ${{ gitea.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Prepare the container + run: curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ gitea.actor }} + password: ${{ secrets.AUTH_TOKEN }} + + - name: Extract metadata for registry + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ./SteamCMD-Installer + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitea/workflows/SteamCMD.yml b/.gitea/workflows/SteamCMD.yml index 2583762..e201625 100644 --- a/.gitea/workflows/SteamCMD.yml +++ b/.gitea/workflows/SteamCMD.yml @@ -5,6 +5,8 @@ on: push: branches: - "main" + paths: + - "SteamCMD/*" # schedule: # - cron: "37 18 * * *"