From 402962e3868eb45ad8a7dfe7c1299108e4d2e1c3 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Wed, 9 Oct 2024 22:28:00 -0400 Subject: [PATCH] image publishing Took 6 minutes --- .gitea/workflows/publish.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..a08d96e --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,49 @@ +name: Publish Image + +on: + push: + branches: [ "master" ] + paths-ignore: + - README.md + - LICENSE + +jobs: + deploy: + strategy: + matrix: + arch: [ "ubuntu-latest" ] + git-version: [ "2.44.0" ] + runs-on: ${{ matrix.arch }} + + # Steps to run + steps: + # Checkout the repo + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Set up Docker Buildx + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Login to the Docker registry + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: git.rainnny.club + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + + # Publish the image + - name: Build Image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: | + git.rainnny.club/PulseApp/docs:${{ github.sha }} + git.rainnny.club/PulseApp/docs:latest + build-args: | + GIT_REV=${{ gitea.sha }} \ No newline at end of file