Authorization Docker Image CI #238
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: Authorization Docker Image CI | |
on: | |
create: | |
push: | |
paths: | |
- 'Authorization/**' | |
- '.github/workflows/Authorization_docker_build_push.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Extract branch name | |
if: startsWith(github.ref , 'refs/heads/') | |
shell: bash | |
run: echo "docker_tag=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | |
- name: Extract branch tag | |
if: startsWith(github.ref , 'refs/tags/') | |
shell: bash | |
run: echo "docker_tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV | |
- name: Build and push | |
uses: docker/[email protected] | |
with: | |
context: ./Authorization | |
file: Authorization/Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: osirixfoundation/kheops-authorization:${{ env.docker_tag }} |