CI: add Docker build/push workflow #1
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 image and push it to registry" | |
on: | |
push: | |
branches: | |
- 'development' | |
- 'ci-test' | |
jobs: | |
push-image: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Check out Yoda repository | |
uses: actions/checkout@v3 | |
with: | |
repository: UtrechtUniversity/yoda | |
ref: development | |
- name: Authenticate to the container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker/images/yoda_web_mock | |
file: ./Dockerfile | |
push: true | |
tags: ghcr.io/utrechtuniversity/yoda-web-mock:dev-1.9 |