Merge pull request #12 from ScilifelabDataCentre/dockerfile_branch #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push precision medicine portal container image | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build_push_container: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run docker/setup-qemu-action | |
uses: docker/setup-qemu-action@v3 | |
- name: Run docker/setup-buildx-action | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: List available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: Run docker/login-action | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run docker/metadata-action | |
id: metadata_action_id | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/ScilifelabDataCentre/precision-medicine-portal-frontend | |
flavor: | | |
latest=auto | |
tags: | | |
type=sha,format=long | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
labels: | | |
org.opencontainers.image.title=precision-medicine-portal-frontend | |
org.opencontainers.image.description=precision medicine web portal frontend | |
org.opencontainers.image.url=${{ github.event.repository.html_url }} | |
org.opencontainers.image.source=${{ github.event.repository.html_url }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.metadata_action_id.outputs.tags }} | |
labels: ${{ steps.metadata_action_id.outputs.labels }} |