Merge pull request #9 from rosalindfranklininstitute/christmastree2023 #7
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
deploy: | |
name: Build and push image | |
runs-on: ubuntu-latest | |
environment: deployment | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Build Image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: christmasdream | |
tags: latest ${{ github.ref_name }} | |
containerfiles: | | |
./web-deployment/Dockerfile | |
context: ./web-deployment | |
- name: Push To quay.io | |
id: push-to-quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: quay.io/rosalindfranklininstitute | |
username: ${{ secrets.QUAY_IO_USERNAME }} | |
password: ${{ secrets.QUAY_IO_PASSWORD }} | |
- name: Print image url | |
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" |