Build and push development image #66
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 and push development image | |
on: | |
push: | |
paths: | |
- "**.Containerfile" | |
schedule: | |
# At 5:15 on a Sunday | |
- cron: "15 5 * * 0" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build development images | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get current date | |
id: date | |
uses: Kaven-Universe/github-action-current-date-time@v1 | |
with: | |
format: "YYYY-MM-DD" | |
- name: Build base image | |
id: build-base-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: base | |
tags: latest ${{ steps.date.outputs.time }}-${{ github.sha }} | |
containerfiles: | | |
./images/base.Containerfile | |
- name: Push base to Docker | |
id: push-base-to-docker | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-base-image.outputs.image }} | |
tags: ${{ steps.build-base-image.outputs.tags }} | |
registry: docker.io/${{ github.actor }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build admin image | |
id: build-admin-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: admin | |
tags: latest ${{ steps.date.outputs.time }}-${{ github.sha }} | |
containerfiles: | | |
./images/admin.Containerfile | |
- name: Push admin to Docker | |
id: push-admin-to-docker | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-admin-image.outputs.image }} | |
tags: ${{ steps.build-admin-image.outputs.tags }} | |
registry: docker.io/${{ github.actor }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build work image | |
id: build-work-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: work | |
tags: latest ${{ steps.date.outputs.time }}-${{ github.sha }} | |
containerfiles: | | |
./images/work.Containerfile | |
- name: Push work to Docker | |
id: push-work-to-docker | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-work-image.outputs.image }} | |
tags: ${{ steps.build-work-image.outputs.tags }} | |
registry: docker.io/${{ github.actor }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} |