From 6dcd0dcf8a6f453988bfb198dcb5d8fbffcd130e Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Tue, 12 Dec 2023 23:33:24 +0200 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..46ccab5 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,35 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build the dynamic Docker image + run: docker build -t neobility/osrm-backend-docker dynamic + + - name: Build the static Romania Docker image + run: docker build --build-arg MAP_URL=https://download.geofabrik.de/europe/romania-latest.osm.pbf -t neobility/osrm-backend-docker:romania prebuilt + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Push dynamic Docker image + run: docker push neobility/osrm-backend-docker + + - name: Push static Romania Docker image + run: docker push neobility/osrm-backend-docker:romania