Replaced the swap logic with the swap method present in the algorithm… #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: Docker Build, Test & Push | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build Docker image | |
| run: docker build -t array-header-test . | |
| - name: Run build & test inside Docker | |
| run: docker run --rm array-header-test | |
| - name: Tag image for Docker Hub | |
| run: | | |
| docker tag array-header-test ${{ secrets.DOCKERHUB_USERNAME }}/array-header:latest | |
| - name: Push image to Docker Hub | |
| run: | | |
| docker push ${{ secrets.DOCKERHUB_USERNAME }}/array-header:latest |