diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..229821e --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,34 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Print SHA-256 Hash of Secret + run: | + echo -n "$TEST" | sha256sum | awk '{print $1}' + env: + TEST: ${{ secrets.TEST }} + + # - name: Login to container registry + # uses: docker/login-action@v3 + # with: + # registry: registry.itzana.me + # username: ${{ secrets.REGISTRY_USER }} + # password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push api + uses: docker/build-push-action@v6 + with: + file: Containerfile + context: . + push: false + tags: registry.itzana.me/strafesnet/test:${{ gitea.run_id }} \ No newline at end of file diff --git a/Containerfile b/Containerfile index 7203e1b..4843f8a 100644 --- a/Containerfile +++ b/Containerfile @@ -7,9 +7,6 @@ WORKDIR /app # Copy go.mod and go.sum files COPY go.mod go.sum ./ -# Download dependencies -RUN --mount=type=secret,id=netrc,dst=/root/.netrc go mod download - # Copy the entire project COPY . .