From c9f40659bdca8942b102d5cd30cdee7335ca3c05 Mon Sep 17 00:00:00 2001 From: Snuffy2 Date: Thu, 2 May 2024 19:56:38 -0400 Subject: [PATCH] Update build_docker.yml --- .github/workflows/build_docker.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index a79c2f8..2d877b1 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -16,6 +16,24 @@ jobs: - name: Get branch names id: branch-names uses: tj-actions/branch-names@v8 + - name: GitHub Context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: List variables + run: | + echo "::group::List variables + echo "github.event_name: ${{ github.event_name }}" + echo "github.ref_name: ${{ github.ref_name }}" + echo "Default Branch: ${{ steps.branch-names.outputs.default_branch }}" + echo "Current Branch: ${{ steps.branch-names.outputs.current_branch }}" + echo "Base Ref: ${{ steps.branch-names.outputs.base_ref_branch }}" + echo "Head Ref: ${{ steps.branch-names.outputs.head_ref_branch }}" + echo "Ref: ${{ steps.branch-names.outputs.ref_branch }}" + echo "Is Default: ${{ steps.branch-names.outputs.is_default }}" + echo "Is Tag: ${{ steps.branch-names.outputs.is_tag }}" + echo "Current tag: ${{ steps.branch-names.outputs.tag }}" + echo "::endgroup::" - name: Checkout uses: actions/checkout@v4.1.4 - name: Set up QEMU @@ -23,11 +41,11 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Update Version in const.py - if: ${{ github.event_name == 'release' && steps.branch-names.outputs.is_default == 'true' }} + if: ${{ github.event_name == 'release' && steps.branch-names.outputs.default_branch == github.ref_name }} run: | sed -i 's/VERSION \= \".*\"/VERSION \= \"${{ github.ref_name }}\"/' ./const.py - name: Commit & Push Version Changes - if: ${{ github.event_name == 'release' && steps.branch-names.outputs.is_default == 'true' }} + if: ${{ github.event_name == 'release' && steps.branch-names.outputs.default_branch == github.ref_name }} uses: actions-js/push@master with: github_token: ${{ secrets.GITHUB_TOKEN }}