Skip to content

Commit

Permalink
ci: 👷 add action to release tagged services
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Ruck committed Oct 21, 2023
1 parent 039497a commit b6b4c94
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-and-push-tagged.yaml
Original file line number Diff line number Diff line change
@@ -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: [email protected]
- 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 }}

0 comments on commit b6b4c94

Please sign in to comment.