ci: remove sudo and remove extra build #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build or Release Image | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+**' | |
| branches: | |
| - 'mayastor' | |
| jobs: | |
| plugin: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| id: go | |
| - name: Set Image Tag | |
| run: | | |
| if [[ "${{ github.event_name }}" = "tag" ]]; then | |
| TAG="${{ github.ref_name }}" | |
| else | |
| TAG="develop" | |
| fi | |
| echo "TAG=${TAG}" >> $GITHUB_ENV | |
| echo "IMAGE_TAG=${TAG}" >> $GITHUB_ENV | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build & Push Image | |
| run: make all |