From 97e6d78ce6c11cf7e1d7f88e3530de0ec0db18cd Mon Sep 17 00:00:00 2001 From: Dan Cojocaru Date: Tue, 26 Dec 2023 05:04:10 +0100 Subject: [PATCH] Add GitHub action for build on push --- .github/workflows/build-latest-image.yml | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build-latest-image.yml diff --git a/.github/workflows/build-latest-image.yml b/.github/workflows/build-latest-image.yml new file mode 100644 index 0000000..3f63143 --- /dev/null +++ b/.github/workflows/build-latest-image.yml @@ -0,0 +1,30 @@ +name: Build latest Docker image +on: + push: + branches: + - master +jobs: + docker: + permissions: + contents: read + packages: write + runs-on: + - ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ghcr.io/${{ github.actor }}/cfr_train_info_telegram_bot:latest