Skip to content

Commit

Permalink
cicd: separate updater test and updater build
Browse files Browse the repository at this point in the history
  • Loading branch information
Naramsim committed Dec 13, 2023
1 parent edfe4de commit 72c87e3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
COMMIT_NAME: Updater Bot
REPO_DATA: https://github.com/PokeAPI/api-data.git
REPO_POKEAPI: https://github.com/PokeAPI/pokeapi.git
- name: Run and test
run: |
docker network create pokeapi
docker run --privileged -e 'COMMIT_AND_PUSH=false' -e "REPO_APIDATA_CHECKOUT_OBJECT=${{ github.sha }}" -e 'REPO_POKEAPI=https://github.com/PokeAPI/pokeapi.git' -e 'REPO_DATA=https://github.com/PokeAPI/api-data.git' --rm ${{ steps.meta.outputs.tags }}
- name: Image digest and tag
run: |
echo ${{ steps.docker_build.outputs.digest }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Updater script

on:
pull_request:

jobs:
updater:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run and test
run: (cd updater && bash cmd.bash)
env:
BRANCH_NAME: updater-bot
COMMIT_AND_PUSH: false
COMMIT_EMAIL: ""
COMMIT_MESSAGE: "[Updater Bot] Regenerate data"
COMMIT_NAME: Updater Bot
REPO_DATA: https://github.com/PokeAPI/api-data.git
REPO_POKEAPI: https://github.com/PokeAPI/pokeapi.git

0 comments on commit 72c87e3

Please sign in to comment.