diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml new file mode 100644 index 0000000..a02fc07 --- /dev/null +++ b/.github/workflows/docker-image-dev.yml @@ -0,0 +1,41 @@ +name: Build container image - dev +on: + push: + branches: + - 'dev' + tags: + - '*' + pull_request: + paths: + - .github/workflows/docker-image-dev.yml + - Dockerfile +jobs: + build-image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-qemu-action@v1 + - uses: docker/setup-buildx-action@v1 + - uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + if: github.event_name != 'pull_request' + - uses: docker/metadata-action@v3 + id: meta + with: + images: techfever/check_oracle_bot_dev + flavor: | + latest=auto + tags: | + type=edge,branch=main + type=match,pattern=v(.*),group=0 + type=ref,event=pr + - uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/amd64,linux/arm64,linux/arm,linux/386,linux/s390x + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=registry,ref=techfever/check_oracle_bot_dev:latest + cache-to: type=inline diff --git a/README.md b/README.md index 20be1d7..244f21d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ apt install gcc python3-pip -y ```shell mkdir -p /opt/bot/data/ && cd /opt/bot/ -git clone https://github.com/tech-fever/check_oracle_bot.git +git clone https://github.com/tech-fever/check_oracle_bot.git ./ pip install -r requirements.txt cp conf.ini.example conf.ini ```