From ac2738b888b730cd343eeef8df9e4712419a2e54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Javier=20Mill=C3=A1n=20Acosta?=
<83466805+jmillanacosta@users.noreply.github.com>
Date: Thu, 2 May 2024 11:31:20 +0200
Subject: [PATCH] Fixes docker job and setup.sh updating
---
.github/workflows/buildandpush.yml | 40 ++++++++++++++++--------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/buildandpush.yml b/.github/workflows/buildandpush.yml
index f074550..8957066 100644
--- a/.github/workflows/buildandpush.yml
+++ b/.github/workflows/buildandpush.yml
@@ -24,34 +24,24 @@ jobs:
-
name: Checkout
uses: actions/checkout@v3
- -
- name: Set up QEMU
- uses: docker/setup-qemu-action@v2
- -
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
- -
- name: Login to Docker Hub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Retrieve JAR version name
run: |
- wget https://raw.githubusercontent.com/bridgedb/BridgeDbWebservice/main/pom.xml
- echo "BDBVERSION=$(cat pom.xml | grep -m 1 -oP "(?<=).*" | sed 's|||g')" >> $GITHUB_ENV
+ wget https://raw.githubusercontent.com/bridgedb/BridgeDbWebservice/main/pom.xml
+ echo "BDBVERSION=$(cat pom.xml | grep -m 1 -oP "(?<=).*" | sed 's|||g')" >> $GITHUB_ENV
+
-
name: Retrieve WebService version name
run: |
- wget https://raw.githubusercontent.com/bridgedb/BridgeDbWebservice/main/pom.xml
- echo "BRIDGEDBWSVERSION=$(cat pom.xml | grep -m 1 -oP "(?<=).*" | sed 's|||g')" >> $GITHUB_ENV
-
+ wget https://raw.githubusercontent.com/bridgedb/BridgeDbWebservice/main/pom.xml
+ echo "BRIDGEDBWSVERSION=$(cat pom.xml | grep -m 1 -oP "(?<=).*" | sed 's|||g')" >> $GITHUB_ENV
+
- name: Update setup.sh with BDBWSVERSION
run: |
- cat setup.sh | sed 's|BRIDGEDBWSVERSION=".\+"|BRIDGEDBWSVERSION="${{ env.BRIDGEDBWSVERSION }}"|g' > setup.sh
+ cat setup.sh | sed 's|BRIDGEDBWSVERSION=".\+"|BRIDGEDBWSVERSION="${{ env.BRIDGEDBWSVERSION }}"|g' > setup_tmp.sh
+ mv setup_tmp.sh setup.sh
- - name: commit and push setup.sh # Test whether it is necessary to push before the docker action accesses repository from git context
+ - name: commit and push setup.sh
run: |
git config --local user.name actions-user
git config --local user.email "actions@github.com"
@@ -67,6 +57,18 @@ jobs:
runs-on: ubuntu-latest
needs: update-version
steps:
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+ -
+ name: Login to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Retrieve tags
run: |