Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use correct package when publish aam-backend-service #60

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/aam-backend-service-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

- name: Extract tag (release)
if: ${{ github.event.ref != '' }}
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
run: echo "TAG=${GITHUB_REF#refs/tags/aam-backend-service/}" >> $GITHUB_ENV

- name: Extract tag (pull request)
if: ${{ github.event.ref == '' }}
Expand All @@ -124,6 +124,10 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,enable=true,event=pr
type=semver,enable=true,pattern={{raw}},priority=600,value=${{ env.TAG }},event=branch
type=semver,enable=true,pattern={{raw}},priority=600,value=${{ env.TAG }},event=tag
images: ${{ env.REGISTRY_IMAGE }}

- name: Set up QEMU
Expand All @@ -150,6 +154,7 @@ jobs:
with:
platforms: ${{ matrix.platform }}
context: ./application/aam-backend-service
provenance: false
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha
Expand Down Expand Up @@ -188,10 +193,22 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract tag (release)
if: ${{ github.event.ref != '' }}
run: echo "TAG=${GITHUB_REF#refs/tags/aam-backend-service/}" >> $GITHUB_ENV

- name: Extract tag (pull request)
if: ${{ github.event.ref == '' }}
run: echo "TAG=pr-${{ github.event.number }}" >> $GITHUB_ENV

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,enable=true,event=pr
type=semver,enable=true,pattern={{raw}},priority=600,value=${{ env.TAG }},event=branch
type=semver,enable=true,pattern={{raw}},priority=600,value=${{ env.TAG }},event=tag
images: ${{ env.REGISTRY_IMAGE }}

- name: Login to GitHub Container Registry
Expand All @@ -215,8 +232,6 @@ jobs:
- test
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
defaults:
run:
working-directory: application/aam-backend-service
Expand Down Expand Up @@ -257,7 +272,7 @@ jobs:
- name: Create Release
if: env.CURRENT_VERSION != env.NEXT_VERSION
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME=aam-backend-service/${{ env.NEXT_VERSION }}
gh api \
Expand Down
Loading