Skip to content

Commit

Permalink
Update container_apps_chat_cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Oct 15, 2023
1 parent 24c0fc9 commit a3210b8
Showing 1 changed file with 2 additions and 44 deletions.
46 changes: 2 additions & 44 deletions .github/workflows/container_apps_chat_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,53 +42,11 @@ jobs:
(needs.test.result == 'success' || needs.test.result == 'skipped')
needs: [test]
runs-on: ubuntu-latest
env:
DOCKER_IMAGE_NAME: chat
steps:

- name: Checkout code
uses: actions/checkout@v4

# Apply tags and labels based on GitHub Actions events and Git metadata
- name: Apply Docker Image tags & labels
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE_NAME }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=match,pattern=v(.*),group=1
type=match,pattern=v(\d.\d),group=1
type=match,pattern=v(\d),group=1
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
context: .
file: ./src/container_apps/Jordnaer.Chat/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Azure Login
uses: azure/login@v1
with:
Expand All @@ -99,8 +57,8 @@ jobs:
with:
appSourcePath: ${{ github.workspace }}src/container_apps/Jordnaer.Chat
registryUrl: gcr.io
registryUsername: ${{ secrets.CHAT_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.CHAT_REGISTRY_PASSWORD }}
registryUsername: ${{ github.repository_owner }}
registryPassword: ${{ secrets.GITHUB_TOKEN }}
containerAppName: chat
resourceGroup: Jordnaer
imageToBuild: gcr.io/nielspilgaard/chat:${{ github.sha }}
Expand Down

0 comments on commit a3210b8

Please sign in to comment.