From b6b4c94019788778d990d44af7afc1ee3d527680 Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Sat, 21 Oct 2023 18:48:41 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=91=B7=20add=20action=20to=20releas?= =?UTF-8?q?e=20tagged=20services?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-and-push-tagged.yaml | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build-and-push-tagged.yaml diff --git a/.github/workflows/build-and-push-tagged.yaml b/.github/workflows/build-and-push-tagged.yaml new file mode 100644 index 000000000..58e85548d --- /dev/null +++ b/.github/workflows/build-and-push-tagged.yaml @@ -0,0 +1,30 @@ +name: Build and Push tagged + +on: + push: + tags: + - '*' + +jobs: + get-tagged-service: + runs-on: ubuntu-latest + outputs: + TAGGED_SERVICE: ${{ steps.get-tagged-service.outputs.TAGGED_SERVICE }} + steps: + # syntax: qr-code-handler@v1.0.8 + - name: Get tagged service + id: get-tagged-service + run: | + service=$(echo "${{ github.ref_name }}" | sed -n 's/^\(.*\)@v.*/\1/p') + serviceJSON=[\"$service\"] + echo "TAGGED_SERVICE=$serviceJSON" >> $GITHUB_OUTPUT + echo $serviceJSON + + build-and-push: + uses: ./.github/workflows/build-and-push.yaml + needs: get-tagged-service + with: + changedPackages: ${{ needs.get-tagged-service.outputs.TAGGED_SERVICE }} + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}