diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 82c47a27..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,32 +0,0 @@ -jobs: - update_repo_info: - docker: - - image: devdemisto/dockerbuild:1.0.0.25778 - resource_class: small - steps: - - checkout - - setup_remote_docker - - add_ssh_keys: - fingerprints: - - SHA256:HDjXb+EIco/xPtCiblLoN2WDyjfRl8488OsY+JW0EoM - - run: - name: Update Docker Repo Info - command: | - ./update-repository-info.sh - - store_artifacts: - path: artifacts -workflows: - version: 2 - full_build: - jobs: - - update_repo_info - nightly: - jobs: - - update_repo_info - triggers: - - schedule: - cron: "0 1 * * *" - filters: - branches: - only: - - master diff --git a/.github/workflows/full_build.yml b/.github/workflows/full_build.yml new file mode 100644 index 00000000..5f984d18 --- /dev/null +++ b/.github/workflows/full_build.yml @@ -0,0 +1,63 @@ +name: Docker Repository Update + +on: + push: + branches: + - master + schedule: + - cron: '0 1 * * *' + +jobs: + update_docker_repo_info: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python environment + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Set up pipenv + run: | + python -m pip install --upgrade pip + pip install pipenv + + - name: Install dependencies + run: pipenv install + + - name: Run update-docker-repo-info script + run: pipenv run ./update-docker-repo-info.py + + - name: Configure Git for commit + run: | + git config --global user.email "dc-builder@users.noreply.github.com" + git config --global user.name "dc-builder" + + - name: Check for changes + id: git_status + run: | + git status --short > git_changes.txt + cat git_changes.txt + + - name: Upload artifacts (if changes) + if: steps.git_status.outputs.changes != '' + run: | + mkdir -p artifacts + cat git_changes.txt | awk '{print $2}' | sed 's:/*$::' | xargs -I {} cp -rf {} artifacts/. || echo "cp failed for some reason. continue..." + continue-on-error: true + + - name: Commit and push changes + if: steps.git_status.outputs.changes != '' + run: | + git add . + git commit -m "$(date): auto repo info update [skip ci]" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: true + + - name: Print completion message + run: echo "Docker repository update complete." \ No newline at end of file