added order by to internships #26
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 and deploy | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-frontend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Setup env | |
| run: | | |
| cp .env.deploy .env | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: .docker/frontend/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| pull: true | |
| tags: | | |
| ksetcomp/jobfair-2022-frontend:latest | |
| ksetcomp/jobfair-2022-frontend:${{ github.sha }} | |
| build-backend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Setup env | |
| run: | | |
| cp .env.example ./backend/.env | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./backend | |
| file: .docker/backend/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| pull: true | |
| tags: | | |
| ksetcomp/jobfair-2022-backend:latest | |
| ksetcomp/jobfair-2022-backend:${{ github.sha }} | |
| notify-watchtower: | |
| runs-on: ubuntu-latest | |
| needs: [build-frontend, build-backend] | |
| steps: | |
| - name: Notify Watchtower | |
| run: | | |
| curl -sL -v \ | |
| --header 'Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}' \ | |
| "${{ vars.WATCHTOWER_URL }}/v1/update" |