<commit_before>name: CDAF Targetless CD using hosted agent
# This workflow is triggered on pushes to the repository.
on: [push]

jobs:
  build:
    name: CI
    runs-on: Windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Fetch all history for all tags and branches
        run: |
          git config remote.origin.url https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
          git fetch --prune --unshallow

      - name: Feature Branch Targetless CD
        shell: powershell # pwsh for PowerShell Core
        run: |
          cd ${env:GITHUB_WORKSPACE}
          curl.exe -s https://codeload.github.com/cdaf/windows/zip/refs/heads/master -o windows.zip
          Expand-Archive .\windows.zip .
          .\windows-master\automation\entry.ps1 ${env:GITHUB_RUN_NUMBER} ${env:GITHUB_REF}

      - name: Artifact Retention
        uses: actions/upload-artifact@v1
        with:
          name: deploy
          path: release.ps1

  deliver:
    if: github.ref == 'refs/heads/master'
    name: Continuous Delivery
    needs: build
    runs-on: Windows-latest
    steps:
      - name: Download Artifacts
        uses: actions/download-artifact@v1
        with:
          name: deploy
    
      - name: DOCKER
        shell: powershell # pwsh for PowerShell Core
        run: |
          cd ${env:GITHUB_WORKSPACE}\deploy
          .\release.ps1 DOCKER

  registry:
    if: github.ref == 'refs/heads/master'
    name: Push to Registry
    needs: build
    runs-on: Windows-latest
    env:
      DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
    steps:

      - name: Login to Docker Hub
        uses: docker/login-action@v1
        if: ${{ env.DOCKERHUB_TOKEN }} != null
        with:
          username: cdaf
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: PUSH
        if: ${{ env.DOCKERHUB_TOKEN }} != null
        run: |
          cd ${GITHUB_WORKSPACE}/deploy
          chmod +x release.sh
          ./release.sh PUSH<commit_msg>Ensure CI & Cd complete before push<commit_after>name: CDAF Targetless CD using hosted agent
# This workflow is triggered on pushes to the repository.
on: [push]

jobs:
  build:
    name: CI
    runs-on: Windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Fetch all history for all tags and branches
        run: |
          git config remote.origin.url https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
          git fetch --prune --unshallow

      - name: Feature Branch Targetless CD
        shell: powershell # pwsh for PowerShell Core
        run: |
          cd ${env:GITHUB_WORKSPACE}
          curl.exe -s https://codeload.github.com/cdaf/windows/zip/refs/heads/master -o windows.zip
          Expand-Archive .\windows.zip .
          .\windows-master\automation\entry.ps1 ${env:GITHUB_RUN_NUMBER} ${env:GITHUB_REF}

      - name: Artifact Retention
        uses: actions/upload-artifact@v1
        with:
          name: deploy
          path: release.ps1

  deliver:
    if: github.ref == 'refs/heads/master'
    name: Continuous Delivery
    needs: build
    runs-on: Windows-latest
    steps:
      - name: Download Artifacts
        uses: actions/download-artifact@v1
        with:
          name: deploy
    
      - name: DOCKER
        shell: powershell # pwsh for PowerShell Core
        run: |
          cd ${env:GITHUB_WORKSPACE}\deploy
          .\release.ps1 DOCKER

  registry:
    if: github.ref == 'refs/heads/master'
    name: Push to Registry
    needs: [build, deliver]
    runs-on: Windows-latest
    env:
      DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
    steps:
      - name: Download Artifacts
        uses: actions/download-artifact@v1
        if: ${{ env.DOCKERHUB_TOKEN }} != null
        with:
          name: deploy

      - name: Login to Docker Hub
        uses: docker/login-action@v1
        if: ${{ env.DOCKERHUB_TOKEN }} != null
        with:
          username: cdaf
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: PUSH
        if: ${{ env.DOCKERHUB_TOKEN }} != null
        run: |
          cd ${GITHUB_WORKSPACE}/deploy
          chmod +x release.sh
          ./release.sh PUSH
{'fraction_non_alphanumeric': 0.10090702947845805, 'fraction_numerical': 0.003401360544217687, 'mean_word_length': 1.813137755102041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6687377', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1331, 'n_words': 338}