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

removed workflow for creating container instances in azure #301

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
110 changes: 55 additions & 55 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
name: Build and deploy JAR app to Azure Container Instance - hilfling-backend

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Java version
uses: actions/setup-java@v1
with:
java-version: "21"

- name: Build with Maven
run: mvn clean install

- name: Build Docker image
run: |
docker build -t hilfling-backend:${{ github.sha }} .

- name: Log in to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.ACR_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Azure CLI Login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Deploy to Azure Container Instance
run: |
az container create \
--resource-group hilfling-backend_group \
--name hilfling-backend \
--image ${{ secrets.ACR_LOGIN_SERVER }}/hilfling-backend:${{ github.sha }} \
--registry-login-server ${{ secrets.ACR_LOGIN_SERVER }} \
--registry-username ${{ secrets.ACR_USERNAME }} \
--registry-password ${{ secrets.ACR_PASSWORD }} \
--dns-name-label hilfling-backend \
--ports 80
#name: Build and deploy JAR app to Azure Container Instance - hilfling-backend
#
#on:
# push:
# branches:
# - master
# workflow_dispatch:
#
#jobs:
# build:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up Java version
# uses: actions/setup-java@v1
# with:
# java-version: "11"
#
# - name: Build with Maven
# run: mvn clean install
#
# - name: Build Docker image
# run: |
# docker build -t hilfling-backend:${{ github.sha }} .
#
# - name: Log in to Azure Container Registry
# uses: azure/docker-login@v1
# with:
# login-server: ${{ secrets.ACR_LOGIN_SERVER }}
# username: ${{ secrets.ACR_USERNAME }}
# password: ${{ secrets.ACR_PASSWORD }}
#
# deploy:
# runs-on: ubuntu-latest
# needs: build
#
# steps:
# - name: Azure CLI Login
# uses: azure/login@v2
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}
#
# - name: Deploy to Azure Container Instance
# run: |
# az container create \
# --resource-group hilfling-backend_group \
# --name hilfling-backend \
# --image ${{ secrets.ACR_LOGIN_SERVER }}/hilfling-backend:${{ github.sha }} \
# --registry-login-server ${{ secrets.ACR_LOGIN_SERVER }} \
# --registry-username ${{ secrets.ACR_USERNAME }} \
# --registry-password ${{ secrets.ACR_PASSWORD }} \
# --dns-name-label hilfling-backend \
# --ports 80
Loading