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: |