Skip to content

Extract all the images from cs2 #231

Extract all the images from cs2

Extract all the images from cs2 #231

Workflow file for this run

name: Extract all the images from cs2
# extract images whenever we push to main, run it manually, or every day at midnight
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
extract:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set-up s5cmd
uses: peak/action-setup-s5cmd@main
with:
version: v2.0.0
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: "true"
- name: checkoutLFS
uses: actions/checkout@v4
- run: git lfs pull
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run JavaScript file
run: bun run src/index.js
- name: Fix Paths
run: |
find ./data/ -type f -name '*_png.png' -exec sh -c 'mv "$1" "$(dirname "$1")/$(basename "$1" _png.png).png"' sh {} \;
- name: Commit Files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Push Files
file_pattern: "data/scripts/items/items_game.txt data/.DepotDownloader data/Decompiler data/DepotDownloader data/libSkiaSharp.so"
commit_user_name: "Flo4604 (via GitHub Actions)"
- name: Sync files
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_ENDPOINT_URL: ${{ secrets.S3_ENDPOINT_URL }}
run: |
s5cmd sync --delete './data/panorama/images/econ/*' 's3://cs2cdn.com/econ/'