-
-
Notifications
You must be signed in to change notification settings - Fork 26
42 lines (35 loc) · 1.22 KB
/
deploy-adoptium.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Docker Build (Adoptium)
on:
workflow_dispatch:
push:
branches: [ main, production ]
permissions:
id-token: write
contents: read
jobs:
docker-build:
if: startsWith(github.repository, 'adoptium/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Login to Azure
uses: ./.github/actions/azure-login
with:
AZURE_CLIENT_ID_OIDC: ${{ secrets.AZURE_CLIENT_ID_OIDC }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Detect Branch
run: |
case ${GITHUB_REF##*/} in
production) echo "NAMESPACE=api" >> $GITHUB_ENV ;;
*) echo "NAMESPACE=api-staging" >> $GITHUB_ENV ;;
esac
- name: Build container image and push to Azure
uses: ./.github/actions/docker-build
with:
DOCKER_REPO: adoptopenjdkacr.azurecr.io/adoptopenjdk-${{ env.NAMESPACE }}
DOCKER_FILE: ./deploy/Dockerfile
- name: Redeploy Kubernetes Updater and Frontend
uses: ./.github/actions/kubectl-redeploy
with:
NAMESPACE: ${{ env.NAMESPACE }}