diff --git a/.github/workflows/apigws.yml b/.github/workflows/apigws.yml deleted file mode 100644 index 8b72190ca..000000000 --- a/.github/workflows/apigws.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "apigws" - -on: - push: - branches: - - master - - dev - - feature/github-actions - paths: - - src/ApiGateways/* - - .github/workflows/* - - deploy/k8s/helm/apigwmm/* - - deploy/k8s/helm/apigwms/* - - deploy/k8s/helm/apigwwm/* - - deploy/k8s/helm/apigwws/* -jobs: - PublishCharts: - runs-on: ubuntu-16.04 - if: ne('${{ github.event_name }}', 'pull_request') - steps: - - uses: actions/checkout@v2 - - run: Copy '${{ github.workspace }}/deploy/k8s/helm/' '${{ github.workspace }}/deploy/k8s/helm' - shell: pwsh - - uses: actions/upload-artifact@v2 - with: - path: ${{ github.workspace }}/deploy/k8s/helm - name: helm \ No newline at end of file diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml new file mode 100644 index 000000000..a9e7da19b --- /dev/null +++ b/.github/workflows/basket-api.yml @@ -0,0 +1,88 @@ +on: + push: + branches: + - master + - dev + paths: + - src/BuildingBlocks/* + - src/Services/Basket/* + - build/azure-devops/buildimages.yml + - build/azure-devops/multiarch.yml + - build/azure-devops/basket-api/* + - deploy/k8s/helm/basket-api/* +env: + registryEndpoint: https://hub.docker.com/repository/docker/borjasanes/eshoponcontainers + services: basket-api + image: basket.api + branch: $(echo ${GITHUB_REF#refs/heads/}) +jobs: + login: + runs-on: ubuntu-latest + steps: + - + name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.registryEndpoint }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + BuildContainersForPR_Linux: + runs-on: ubuntu-16.04 + if: ${{ github.event_name == 'pull_request' }} + steps: + - uses: actions/checkout@v2 + - name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + BuildContainersForPR_Windows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - uses: actions/checkout@v2 + - name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: pwsh + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + PLATFORM: win + NODE_IMAGE: stefanscherer/node-windows:10 + BuildLinux: + runs-on: ubuntu-16.04 + if: ${{ github.event_name != 'pull_request' }} + steps: + - uses: actions/checkout@v2 + name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} + run: docker-compose push -f src/docker-compose.yml ${{ env.services }}' + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - uses: actions/checkout@v2 + name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: pwsh + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} + run: docker-compose push -f src/docker-compose.yml ${{ env.services }}' + shell: pwsh + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} \ No newline at end of file diff --git a/.github/workflows/basket-api/workflow.yml b/.github/workflows/basket-api/workflow.yml deleted file mode 100644 index 27e685417..000000000 --- a/.github/workflows/basket-api/workflow.yml +++ /dev/null @@ -1,25 +0,0 @@ -#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet -#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet -on: - push: - branches: - - master - - dev - paths: - - src/BuildingBlocks/* - - src/Services/Basket/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/basket-api/* - - deploy/k8s/helm/basket-api/* -env: - registryEndpoint: eshop-registry -jobs: - job_1_template: - # 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet' - steps: - - uses: actions/checkout@v2 - job_2_template: - # 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet' - steps: - - uses: actions/checkout@v2 \ No newline at end of file