Merge pull request #87 from snuhcs-course/last-placeRec #55
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: Build image for backend for ml | |
on: | |
push: | |
branches: | |
- main | |
pathes: | |
- 'idl/**' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Log into GitHub Container Registry | |
run: echo "${{ secrets.GH_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Go to ml repo | |
run: | | |
cd ml | |
- name: Add SHORT_SHA | |
run: | | |
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV | |
echo ${SHORT_SHA} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker build & push | |
uses: docker/build-push-action@v3 | |
env: | |
SHORT_SHA: ${{ env.SHORT_SHA }} | |
with: | |
context: ml/ | |
pull: true | |
push: true | |
tags: ghcr.io/snuhcs-course/swpp-2023-project-team-8/ml:${{ env.SHORT_SHA }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |