Skip to content

Commit

Permalink
Add GitHub Action to build the container and push the image to quay.io
Browse files Browse the repository at this point in the history
  • Loading branch information
lahtinep committed Oct 30, 2024
1 parent 5056410 commit ecd4c2f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Push Image
on:
push:
tags:
- '*'

jobs:
build:
name: Build and push image
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: weather-satellites-segment-gatherer
tags: latest ${{ github.ref_name }}
containerfiles: |
./Dockerfile
- 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/fmi
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"

0 comments on commit ecd4c2f

Please sign in to comment.