diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 25ae3195fd..058f928a6b 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -2,14 +2,15 @@ name: Build and Push Docker Image on: pull_request: - types: [closed] branches: - master - labels: - - CI:Build + types: + - closed + - labeled jobs: build: + if: github.event.label.name == 'CI:Build' runs-on: ubuntu-latest steps: @@ -25,11 +26,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PAT }} - - name: Set ENV Variable for Docker Compose - run: echo "DOCKER_HUB_USERNAME=${{ secrets.DOCKER_HUB_USERNAME }}" >> $GITHUB_ENV - - name: Build and Push Docker Image run: | docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest . docker push ${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest - diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index 2947f49f5b..82e3e5b8e1 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -1,17 +1,15 @@ name: Deploy and Test Hardhat Project -#check - on: pull_request: - types: [closed] branches: - master - labels: - - CI:Deploy + types: + - labeled jobs: deploy: + if: github.event.label.name == 'CI:Deploy' runs-on: ubuntu-latest steps: @@ -43,4 +41,4 @@ jobs: npx hardhat test - name: Shutdown Docker Compose - run: docker-compose down + run: docker-compose down \ No newline at end of file