Add workflow context
All checks were successful
Context testing / dump_contexts_to_log (push) Successful in 2s
Build and release project / Explore-Gitea-Actions (push) Successful in 50s

This commit is contained in:
2025-11-22 10:26:23 +03:00
parent 65a13302da
commit 1857e3480a
3 changed files with 41 additions and 2 deletions

View File

@@ -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"

View File

@@ -23,7 +23,7 @@ jobs:
- name: Build and test application - name: Build and test application
run: | run: |
mkdir bin mkdir bin
go build -o ./bin/metrics ./cmd GOOS=linux go build -o ./bin/metrics ./cmd
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3

View File

@@ -4,6 +4,6 @@ WORKDIR /app
COPY ./bin/metrics . COPY ./bin/metrics .
RUN chmod +x metrics RUN chmod +x /app/metrics
CMD ["/app/metrics"] CMD ["/app/metrics"]