From f30686fd7ca35faa2722530df213b07b458ae9ef Mon Sep 17 00:00:00 2001 From: William P Date: Thu, 5 Mar 2026 23:28:58 -0500 Subject: [PATCH] start pushing test images --- .gitea/workflows/build-testing.yaml | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .gitea/workflows/build-testing.yaml diff --git a/.gitea/workflows/build-testing.yaml b/.gitea/workflows/build-testing.yaml new file mode 100644 index 0000000..39fcd9d --- /dev/null +++ b/.gitea/workflows/build-testing.yaml @@ -0,0 +1,49 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - v1-refactor # Trigger on push to the main branch; adjust as needed + +jobs: + build-and-push: + runs-on: ubuntu-latest # Use a runner with Docker support + container: ghcr.io/catthehacker/ubuntu:act-latest # Image with Docker pre-installed + outputs: + sha_short: ${{ steps.vars.outputs.sha_short }} + steps: + # Checkout the repository code + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Set outputs + id: vars + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + # Set up Docker Buildx for building the image + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: remote + endpoint: 'tcp://buildkitd:1234' + + # Log in to the Gitea container registry + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: git.dubyatp.xyz + username: williamp + password: ${{ secrets.ACTIONS_TOKEN }} # Personal Access Token for authentication + + # Build and push the Docker image + - name: Build and Push Docker Image + uses: docker/build-push-action@v6 + with: + context: . # Build context (current directory) + file: ./Dockerfile # Path to Dockerfile + platforms: "linux/amd64,linux/arm64" + push: true # Push to registry after building + tags: | + git.dubyatp.xyz/williamp/yt-dlp-bot:refactor-test-${{steps.vars.outputs.sha_short }} + # Tags the image with 'latest' and the commit SHA \ No newline at end of file