Skip to content

Adding the files to build the prod docker image #1

Adding the files to build the prod docker image

Adding the files to build the prod docker image #1

name: build-push-docker-image
on:
push:
branches: feature/docker_configs
workflow_dispatch:
jobs:
build-push-docker-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get the latest release
id: release
uses: robinraju/release-downloader@v1.7
with:
latest: true
fileName: "*.tar.bz2"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Production image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.prod
platforms: linux/amd64
push: true
tags: |
ghcr.io/openconext/openconext-profile/openconext-profile:prod
ghcr.io/openconext/openconext-profile/openconext-profile:${{ github.sha }}
ghcr.io/openconext/openconext-profile/openconext-profile:${{ steps.release.outputs.tag_name }}