diff --git a/workflows/github-actions-demo.yml b/workflows/github-actions-demo.yml index 7ee394b..e3b10a2 100644 --- a/workflows/github-actions-demo.yml +++ b/workflows/github-actions-demo.yml @@ -12,21 +12,29 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check out the repository + - name: checkout uses: actions/checkout@v4 + with: + path: ecercicios/para-sala/users-api-aula - - - uses: docker/setup-buildx-action@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test + - name: Login to Docker Hub - run: echo dckr_pat_FA_dtQWNNB6w7ki2NTKNTwB76U4 | docker login -u raissabrizeno --password-stdin - - - - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: docker/login-action@v3 + with: + username: raissabrizeno + password: dckr_pat_FA_dtQWNNB6w7ki2NTKNTwB76U4 + + - name: Build and push + id: buildx + uses: docker/setup-buildx-action@v3 with: - context: ./exercicios/para-sala/users-api-aula + context: ./ push: true tags: raissabrizeno/users-api-aula:1.0.0 - - - name: Log out from Docker Hub - run: docker logout