Merge pull request #3 from pantos-io/dependabot/pip/other-dependencie… #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
shared: | |
uses: pantos-io/ci-workflows/.github/workflows/python-ci.yml@v1 | |
with: | |
test-database: true | |
database-name: pantos-validator-node-test | |
database-user: pantos-validator-node | |
database-password: 7FVg7AE3 | |
secrets: inherit | |
docker-build: | |
name: Build Docker images | |
runs-on: ubuntu-latest | |
needs: [shared] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
id: buildx | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-v1.0-validator-node-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx-v1.0-validator-node- | |
- name: Build and load | |
run: | | |
docker buildx bake \ | |
--set "*.cache-from=type=local,src=/tmp/.buildx-cache" \ | |
--set "*.cache-to=type=local,dest=/tmp/.buildx-cache-new" \ | |
--set "*.platform=linux/amd64" \ | |
--builder ${{ steps.buildx.outputs.name }} \ | |
-f docker-compose.yml \ | |
--load | |
- name: Create local keystore | |
run: | | |
echo "1234" > password.keystore | |
mkdir keystore_folder | |
docker run --rm -v=.:/local ethereum/client-go account new --keystore /local/keystore_folder --password /local/password.keystore | |
sudo chmod -R 777 keystore_folder | |
mv keystore_folder/UTC* ./keystore | |
# - name: Test image | |
# run: | | |
# docker compose up -d | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
build: | |
needs: [shared] | |
uses: ./.github/workflows/build.yml | |
secrets: 'inherit' |