diff --git a/.gitea/workflows/contexts.yaml b/.gitea/workflows/contexts.yaml new file mode 100644 index 0000000..8e1c212 --- /dev/null +++ b/.gitea/workflows/contexts.yaml @@ -0,0 +1,39 @@ +name: Context testing +on: + push: + branches: + - main + +jobs: + dump_contexts_to_log: + runs-on: ubuntu-latest + steps: + - name: Dump Gitea context + env: + GITEA_CONTEXT: ${{ toJson(gitea) }} + run: echo "$GITHUB_CONTEXT" + + - name: Dump job context + env: + JOB_CONTEXT: ${{ toJson(job) }} + run: echo "$JOB_CONTEXT" + + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" + + - name: Dump runner context + env: + RUNNER_CONTEXT: ${{ toJson(runner) }} + run: echo "$RUNNER_CONTEXT" + + - name: Dump strategy context + env: + STRATEGY_CONTEXT: ${{ toJson(strategy) }} + run: echo "$STRATEGY_CONTEXT" + + - name: Dump matrix context + env: + MATRIX_CONTEXT: ${{ toJson(matrix) }} + run: echo "$MATRIX_CONTEXT" diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 7f8a2d7..977a0cb 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -23,7 +23,7 @@ jobs: - name: Build and test application run: | mkdir bin - go build -o ./bin/metrics ./cmd + GOOS=linux go build -o ./bin/metrics ./cmd - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/Dockerfile b/Dockerfile index 92a2142..7f2af9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,6 @@ WORKDIR /app COPY ./bin/metrics . -RUN chmod +x metrics +RUN chmod +x /app/metrics CMD ["/app/metrics"] \ No newline at end of file