From 324ac6275f64417c0e5d8b1d79f725220a8abf74 Mon Sep 17 00:00:00 2001 From: 2mal3 <56305732+2mal3@users.noreply.github.com> Date: Sun, 26 Nov 2023 12:15:29 +0100 Subject: [PATCH] ci: don't push to docker on pull request (#42) --- .github/workflows/docker-build.yaml | 10 ++++++++++ verspaetungsorakel/bahn.py | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 7a0077d..6709236 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -26,8 +26,18 @@ jobs: username: 2mal3 password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build + uses: docker/build-push-action@v4 + if: github.ref != 'refs/heads/main' + with: + context: . + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64/v8 + - name: Build and push uses: docker/build-push-action@v4 + if: github.ref == 'refs/heads/main' with: context: . cache-from: type=gha diff --git a/verspaetungsorakel/bahn.py b/verspaetungsorakel/bahn.py index b7ba17f..bde749f 100644 --- a/verspaetungsorakel/bahn.py +++ b/verspaetungsorakel/bahn.py @@ -33,8 +33,6 @@ def get_important_stations(): stations = list(filter(lambda s: s.Verkehr == "FV", stations)) stations = list(filter(lambda s: "Hbf" in s.NAME, stations)) - stations = list(filter(lambda s: "Berlin" in s.NAME, stations)) - return stations