File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+
12name : Node.js CI
23
34on :
45 push :
5- branches : ['ci', 'dev']
6+ branches : ['ci', 'dev', 'main' ]
67 tags : ['v*']
78
89jobs :
@@ -25,10 +26,11 @@ jobs:
2526 build-and-push :
2627 needs : build
2728 runs-on : ubuntu-latest
28- if : github.ref == 'refs/heads/main' || 'refs/heads/ci' || startsWith(github.ref, 'refs/tags/')
29+ if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/ci' || startsWith(github.ref, 'refs/tags/')
2930 defaults :
3031 run :
3132 working-directory : 1-order-service
33+
3234 steps :
3335 - uses : actions/checkout@v4
3436
@@ -40,13 +42,15 @@ jobs:
4042 with :
4143 username : ${{ secrets.DOCKER_USERNAME }}
4244 password : ${{ secrets.DOCKER_PASSWORD }}
45+
4346 - name : Set environment variables
4447 run : |
4548 echo "IMAGE_NAME=${{ secrets.DOCKER_USERNAME }}/${{ vars.IMAGE_NAME_1 }}" >> $GITHUB_ENV
4649 echo "IMAGE_TAG=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
4750 if [[ $GITHUB_REF == refs/tags/* ]]; then
4851 echo "IMAGE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
4952 fi
53+
5054 - name : Build and Push Docker Image
5155 uses : docker/build-push-action@v5
5256 with :
5761 platforms : linux/amd64
5862 cache-from : type=gha
5963 cache-to : type=gha,mode=max
64+
You can’t perform that action at this time.
0 commit comments