Skip to content

Commit

Permalink
Pipeline cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
flounderpinto committed Dec 8, 2023
1 parent 1fb03ce commit 1ba3ede
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set variable
run: |
if [ ${{ github.ref_type }} = 'branch' ]; then
if [ ${{ github.ref_name }} = 'main' ]; then
echo "main"
echo "BUILD_TYPE=main" >> $GITHUB_ENV
else
echo "branch"
echo "BUILD_TYPE=branch" >> $GITHUB_ENV
fi
elif [ ${{ github.ref_type }} = 'tag' ]; then
echo "tag"
echo "BUILD_TYPE=tag" >> $GITHUB_ENV
fi
shell: bash

- name: Read exported variable
run: |
echo "OUTPUT: ${{ steps.check.test-env.test }}"
- name: github.ref_type
run: echo ${{github.ref_type}}

- name: github.ref_name
run: echo ${{github.ref_name}}

- name: github.ref
run: echo ${{github.ref}}

- name: env.BUILD_TYPE
run: echo ${{env.BUILD_TYPE}}

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -53,13 +21,11 @@ jobs:
- name: Docker build branch
run: make docker
if: ${{ github.ref_type == 'branch' }}
#if: ${{ env.BUILD_TYPE == 'branch' }}

- name: Docker build main
run: make docker ARGS="-t latest"
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
#if: ${{ env.BUILD_TYPE == 'main' }}

- name: Docker build tag
run: make docker ARGS="-t ${{github.ref_name}}"
if: ${{ env.BUILD_TYPE == 'tag' }}
if: ${{ github.ref_type == 'tag' }}

0 comments on commit 1ba3ede

Please sign in to comment.