diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml index c823344..4fea0e9 100644 --- a/.github/workflows/auto-pr.yml +++ b/.github/workflows/auto-pr.yml @@ -12,7 +12,6 @@ jobs: create_pr: runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' && github.event.pusher.name != 'dependabot[bot]' }} - steps: - uses: actions/checkout@v4 @@ -74,4 +73,4 @@ jobs: gh pr edit "$PR_NUMBER" --body "$MARKDOWN_CONTENT" continue-on-error: true env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/bulk.yml b/.github/workflows/bulk.yml new file mode 100644 index 0000000..dc50c38 --- /dev/null +++ b/.github/workflows/bulk.yml @@ -0,0 +1,33 @@ +name: Automated Bulk Issue Creator + +on: + schedule: + - cron: '0 */1 * * *' + workflow_dispatch: + inputs: + issue_count: + description: 'Number of Issues' + required: true + default: '100' + +jobs: + create_issue: + runs-on: ubuntu-latest + name: Workflow Job + steps: + - name: Install GitHub CLI + run: | + sudo apt-get install gh -y + - uses: actions/checkout@v4 + - name: Create Issues + run: | + # for i in $(seq 1 ${{ github.event.inputs.issue_count }}); do + for i in $(seq 1 500); do + issue_number=$(gh issue create --title "Automated Issue $i" --body "This is issue $i, created by Hamster [bot]." --label "automated,bot,hamster,issue" --assignee "TheHamsterBot") + echo "Issue #$issue_number created." + sleep 3 + gh issue close "$issue_number" --comment "Hamster [bot] - Closed This Issue." + echo "Issue #$issue_number closed." + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5a5c63e..b0ec04c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,8 +1,8 @@ -name: Deploy to GitHub Container Registry +name: Deploy to GHCR on: schedule: - - cron: '0 0 1 * *' + - cron: '0 0 * * 0' workflow_dispatch: env: @@ -17,11 +17,33 @@ jobs: permissions: contents: read packages: write - + + name: Deploy steps: - - name: Checkout Repository + - name: Checkout uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + + - name: Extract Docker Metadata + id: meta + uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=pr + type=edge + flavor: | + latest=true + labels: | + org.opencontainers.image.title=Classics + org.opencontainers.image.vendor=Vedansh + org.opencontainers.image.source=https://github.com/offensive-vk/Classics + - name: Login to the Container Registry uses: docker/login-action@v3 with: @@ -29,23 +51,18 @@ jobs: username: ${{ env.USERNAME }} password: ${{ env.PASSWORD }} - - name: Extract Metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Verify Tags and Labels run: | echo "## Github Action Summary - GHCR " >> $GITHUB_STEP_SUMMARY - echo "Tags: ${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY - echo "Labels: ${{ steps.meta.outputs.labels }} " >> $GITHUB_STEP_SUMMARY - echo "*** VERIFICATION COMPLETED ***" >> $GITHUB_STEP_SUMMARY + echo "${{ steps.meta.outputs.tags }} " >> $GITHUB_STEP_SUMMARY + echo "${{ steps.meta.outputs.labels }} " >> $GITHUB_STEP_SUMMARY + echo "*** VERIFICATION COMPLETED ***" - name: Build and Push Docker Image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@e44afff3590e1d4f93b6adc72376512edb012a7c # v5.0.0 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..ef764f4 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,19 @@ +name: Docker + +on: + schedule: + - cron: '0 */1 * * *' + push: + branches: [ "classic", "**" ] + pull_request: + branches: [ "classic", "**" ] + workflow_dispatch: + +jobs: + build_image: + runs-on: ubuntu-latest + name: Build Image + steps: + - uses: actions/checkout@v4 + - name: Build the Docker Image + run: docker build . --file Dockerfile -t classics:$(date +%s) \ No newline at end of file diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 41e30f5..58a0434 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -4,14 +4,14 @@ on: schedule: - cron: '0 */2 * * *' push: - branches: ["*"] + branches: ["**"] workflow_dispatch: jobs: sync: runs-on: ubuntu-latest timeout-minutes: 10 - name: Gitlab Sync + name: Sync steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/morning.yml b/.github/workflows/morning.yml index 9f220e5..cad20d0 100644 --- a/.github/workflows/morning.yml +++ b/.github/workflows/morning.yml @@ -24,31 +24,4 @@ jobs: run: | sudo apt update -y; sudo apt install lolcat neofetch -y neofetch | lolcat - uname -a; whoami; df -T - - greetings: - runs-on: macos-latest - timeout-minutes: 5 - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup - id: date_time - run: | - echo "DATE=$(date '+%B %d, %Y')" >> $GITHUB_ENV - echo "TIME=$(date '+%I:%M %p')" >> $GITHUB_ENV - - - name: Say Good Morning - run: | - echo -e "\n# Good Morning, **General** ! \n\nToday is **${{ env.DATE }}** \n\n *Have a Wonderful Day Ahead.*" > GREETINGS.md - - - name: Commit & Push Changes - run: | - git config --global user.name "Hamster [bot]" - git config --global user.email "TheHamsterBot@outlook.com" - git add GREETINGS.md - git commit -m "🤖 Hamster Sends Greeting of the Day." - git push - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} \ No newline at end of file + uname -a; whoami; df -T \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 1116571..0100e76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM ubuntu:latest +FROM debian:bullseye RUN apt-get update && \ apt-get install -y \ - build-essential \ cmake \ git \ clang \ libssl-dev \ + gcc \ && rm -rf /var/lib/apt/lists/* WORKDIR /base