Skip to content

Merge pull request #556 from adoptium/dependabot/submodules/api.adopt… #451

Merge pull request #556 from adoptium/dependabot/submodules/api.adopt…

Merge pull request #556 from adoptium/dependabot/submodules/api.adopt… #451

name: Docker Build (Marketplace)
on:
workflow_dispatch:
push:
branches: [ main, production ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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
with:
submodules: true
- name: Login to Azure
uses: ./api.adoptium.net/.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=marketplace" >> $GITHUB_ENV ;;
*) echo "NAMESPACE=marketplace-staging" >> $GITHUB_ENV ;;
esac
- name: Build container image and push to Azure
uses: ./api.adoptium.net/.github/actions/docker-build
with:
DOCKER_REPO: adoptopenjdkacr.azurecr.io/adoptium-${{ env.NAMESPACE }}
DOCKER_FILE: ./docker/Dockerfile
- name: Redeploy Kubernetes Updater and Frontend
uses: ./api.adoptium.net/.github/actions/kubectl-redeploy
with:
NAMESPACE: ${{ env.NAMESPACE }}