Skip to content

Commit

Permalink
Build and push Image. Dockefile to Containerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
poquirion committed Dec 19, 2023
1 parent 2375fdd commit 3a12631
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
38 changes: 36 additions & 2 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ on:
- 'main'
- 'dev'

jobs:
build:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

env:
REGISTRY_USER: c3genomics+github_pusher
IMAGE_REGISTRY: quay.io
REGISTRY_PASSWORD: ${{ secrets.QUAY_ROBOT_TOKEN }}
IMAGE: c3genomics/project_tracking

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -41,3 +49,29 @@ jobs:
- name: Test with pytest
run: |
pytest -v
build:
needs: test
if: startsWith(github.ref, 'refs/tags')
name: Build image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Buildah Action
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }}
tag: ${{ env.RELEASE_VERSION }} latest_release
containerfiles: ./Containerfile
- name: Push to repo
uses: redhat-actions/push-to-registry@v2
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }}
tag: ${{ env.RELEASE_VERSION }} latest_release
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-repo.outputs.registry-paths }}"

3 changes: 2 additions & 1 deletion Dockerfile → Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM fedora:36
FROM fedora:39
MAINTAINER P-O Quirion po.quirion@mcgill.ca
ENV APP=project_tracking

RUN mkdir /app /sqlite
Expand Down

0 comments on commit 3a12631

Please sign in to comment.