2022-09-12 22:58:40 +02:00
|
|
|
name: Container image builder for RSS single
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_run:
|
|
|
|
workflows: ["CI workflow for RSSingle"]
|
|
|
|
types: [completed]
|
2022-09-13 00:45:26 +02:00
|
|
|
branches: [master]
|
2022-09-12 22:58:40 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-push-container-image:
|
|
|
|
name: Build and push container image to Docker Hub and GHCR.io
|
2024-01-03 21:24:55 +01:00
|
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'tanrax/RSSingle' }}
|
2022-09-12 22:58:40 +02:00
|
|
|
runs-on: ubuntu-latest
|
2024-06-10 20:10:30 +02:00
|
|
|
continue-on-error: true
|
2022-09-12 22:58:40 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Build container image
|
|
|
|
id: build
|
|
|
|
uses: redhat-actions/buildah-build@v2
|
|
|
|
with:
|
2024-01-03 21:24:55 +01:00
|
|
|
image: ${{ github.repository }}
|
2022-09-12 22:58:40 +02:00
|
|
|
tags: latest
|
|
|
|
containerfiles: Dockerfile
|
|
|
|
|
|
|
|
- name: Push container image to Docker Hub
|
|
|
|
uses: redhat-actions/push-to-registry@v2
|
|
|
|
with:
|
|
|
|
image: ${{ steps.build.outputs.image }}
|
|
|
|
tags: ${{ steps.build.outputs.tags }}
|
|
|
|
registry: docker.io
|
2024-01-03 21:24:55 +01:00
|
|
|
username: ${{ github.repository_owner }}
|
2022-09-12 22:58:40 +02:00
|
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
|
|
|
|
- name: Push container image to GHCR.io
|
|
|
|
uses: redhat-actions/push-to-registry@v2
|
|
|
|
with:
|
|
|
|
image: ${{ steps.build.outputs.image }}
|
|
|
|
tags: ${{ steps.build.outputs.tags }}
|
|
|
|
registry: ghcr.io
|
2024-01-03 21:24:55 +01:00
|
|
|
username: ${{ github.repository_owner }}
|
2022-09-12 22:58:40 +02:00
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|