diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caa0f40..fe9b5e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: 'Rebel CI/CD 🚀' on: workflow_dispatch: push: @@ -15,6 +15,7 @@ on: jobs: build: + name: 'Build 🏗️' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -37,13 +38,14 @@ jobs: # run: npm ci docker_build: + name: 'Docker Build 🐳' runs-on: ubuntu-latest needs: build steps: - uses: actions/checkout@v4 - name: Login to Github Container Registry uses: docker/login-action@v3 - # if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() + if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() with: registry: ghcr.io username: ${{ github.actor }} @@ -52,8 +54,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') != true && success() run: | docker build -t ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::7} . - docker push ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::7} - name: Push Docker image if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() run: | - docker push ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::7} + docker push ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}