Lib upgrade oct24 (#13) #27
This file contains 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: publish-docker-images | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y_%m_%d_%H_%m')" | |
- name: Build express-server Image | |
run: docker build -f ./apps/express-server/Dockerfile -t ${{secrets.DOCKER_HUB_USERNAME}}/express-server:${{ steps.date.outputs.date }} . | |
- name: Build nestjs-server Image | |
run: docker build -f ./apps/nestjs-server/Dockerfile -t ${{secrets.DOCKER_HUB_USERNAME}}/nestjs-server:${{ steps.date.outputs.date }} . | |
- name: Build next-client Image | |
run: docker build -f ./apps/next-client/Dockerfile -t ${{ secrets.DOCKER_HUB_USERNAME }}/next-client:${{ steps.date.outputs.date }} . | |
- name: Build react-client Image | |
run: docker build -f ./apps/react-client/Dockerfile -t ${{ secrets.DOCKER_HUB_USERNAME }}/react-client:${{ steps.date.outputs.date }} . | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Push express-server Image to Docker Hub | |
run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/express-server:${{ steps.date.outputs.date }} | |
- name: Push nestjs-server Image to Docker Hub | |
run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/nestjs-server:${{ steps.date.outputs.date }} | |
- name: Push next-client Image to Docker Hub | |
run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/next-client:${{ steps.date.outputs.date }} | |
- name: Push react-client Image to Docker Hub | |
run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/react-client:${{ steps.date.outputs.date }} |