From e9ade3bf5814c806bd600c65c63e0f4c9f90e8c3 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 20 Jul 2024 22:10:31 +0800 Subject: [PATCH] refactor: switch to gitea actions --- .drone.yml | 123 ------------------------------------ .github/workflows/build.yml | 2 +- 2 files changed, 1 insertion(+), 124 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index dbf8000..0000000 --- a/.drone.yml +++ /dev/null @@ -1,123 +0,0 @@ ---- -kind: pipeline -type: docker -name: Build Docker Image (s2oj-db) - -trigger: - branch: - - master - -steps: - - name: tags - image: alpine - commands: - - echo -n "latest, $DRONE_BRANCH, ${DRONE_COMMIT_SHA:0:8}" > .tags - - - name: docker - image: plugins/docker - settings: - registry: git.m.ac - repo: git.m.ac/baoshuo/s2oj-db - context: db - dockerfile: db/Dockerfile - username: baoshuo - password: - from_secret: GITMAC_SECRET - cache_from: git.m.ac/baoshuo/s2oj-db:latest - when: - event: push - branch: master - ---- -kind: pipeline -type: docker -name: Build Docker Image (s2oj-judger) - -trigger: - branch: - - master - -steps: - - name: tags - image: alpine - commands: - - echo -n "latest, $DRONE_BRANCH, ${DRONE_COMMIT_SHA:0:8}" > .tags - - - name: docker - image: plugins/docker - settings: - registry: git.m.ac - repo: git.m.ac/baoshuo/s2oj-judger - context: judger - dockerfile: judger/Dockerfile - username: baoshuo - password: - from_secret: GITMAC_SECRET - cache_from: git.m.ac/baoshuo/s2oj-judger:latest - when: - event: push - branch: master - ---- -kind: pipeline -type: docker -name: Build Docker Image (s2oj-remote-judger) - -trigger: - branch: - - master - -steps: - - name: tags - image: alpine - commands: - - echo -n "latest, $DRONE_BRANCH, ${DRONE_COMMIT_SHA:0:8}" > .tags - - - name: docker - image: plugins/docker - settings: - registry: git.m.ac - repo: git.m.ac/baoshuo/s2oj-remote-judger - context: remote_judger - dockerfile: remote_judger/Dockerfile - username: baoshuo - password: - from_secret: GITMAC_SECRET - cache_from: git.m.ac/baoshuo/s2oj-remote-judger:latest - when: - event: push - branch: master - ---- -kind: pipeline -type: docker -name: Build Docker Image (s2oj-web) - -trigger: - branch: - - master - -steps: - - name: tags - image: alpine - commands: - - echo -n "latest, $DRONE_BRANCH, ${DRONE_COMMIT_SHA:0:7}" > .tags - - - name: version - image: alpine - commands: - - sed -i "s/'s2oj-version' => 'dev'/'s2oj-version' => '${DRONE_COMMIT_SHA:0:7}'/g" web/app/.default-config.php - - - name: docker - image: plugins/docker - settings: - registry: git.m.ac - repo: git.m.ac/baoshuo/s2oj-web - dockerfile: web/Dockerfile - username: baoshuo - password: - from_secret: GITMAC_SECRET - cache_from: git.m.ac/baoshuo/s2oj-web:latest - when: - event: push - branch: master diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 682fe8e..2c8a253 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: env: - REGISTRY: ghcr.io + REGISTRY: ${{ startsWith(github.server_url, 'https://github.com') && 'ghcr.io' || 'git.m.ac' }} IMAGE_BASENAME: ${{ github.repository }} jobs: