Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cbarbian-sap committed Jul 14, 2023
1 parent 2eb91cf commit 054f565
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,9 @@ jobs:
needs: test
permissions:
contents: read
env:
IMAGE_NAME: ${{ github.repository }}
outputs:
image-archive: image.tar
image-repository: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
image-repository: ${{ steps.prepare-repository-name.outputs.repository }}
image-tag: ${{ steps.extract-metadata.outputs.version }}

steps:
Expand All @@ -141,11 +139,17 @@ jobs:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Prepare repository name
id: prepare-repository-name
run: |
repository=$REGISTRY/${{ github.repository }}
echo "repository=${repository,,}" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: extract-metadata
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ steps.prepare-repository-name.outputs.repository }}

- name: Build Docker image
uses: docker/build-push-action@v4
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
permissions:
contents: read
packages: write
env:
IMAGE_NAME: ${{ github.repository }}

steps:
- name: Checkout repository
Expand All @@ -41,11 +39,17 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Prepare repository name
id: prepare-repository-name
run: |
repository=$REGISTRY/${{ github.repository }}
echo "repository=${repository,,}" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: extract-metadata
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ steps.prepare-repository-name.outputs.repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
Expand Down Expand Up @@ -94,8 +98,8 @@ jobs:
- name: Build and push artifact
run: |
cd crds
repository=${{ github.repository }}/crds
tar cvz * | regctl artifact put -m application/gzip $REGISTRY/${repository,,}:${{ github.event.release.tag_name }}
repository=$REGISTRY/${{ github.repository }}/crds
tar cvz * | regctl artifact put -m application/gzip ${repository,,}:${{ github.event.release.tag_name }}
update-chart:
name: Update Helm chart
Expand Down

0 comments on commit 054f565

Please sign in to comment.