Skip to content

Commit

Permalink
updated github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Plüddemann committed Oct 24, 2024
1 parent 1f37e95 commit 59eaf49
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/provide-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ env:

jobs:
retag_and_push:
name: Provide docker image ${{ matrix.image }} on ghcr.io
name: Provide docker image ${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }} on ghcr.io
runs-on: [ubuntu-latest]
strategy:
matrix:
image:
- maeddes/todobackend-springboot:v2404
- maeddes/todoui-thymeleaf:v2404
- maeddes/todoui-flask:v2404
- maeddes/simple-generator:v2404
- name: todobackend-springboot
tag: v2404
namespace: maeddes
- name: todoui-thymeleaf
tag: v2404
namespace: maeddes
- name: todoui-flask
tag: v2404
namespace: maeddes
- name: simple-generator
tag: v2404
namespace: maeddes
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -31,12 +39,12 @@ jobs:

- name: Pull image from Docker Hub
run: |
docker pull docker.io/${{ matrix.image }}
docker pull docker.io/${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }}
- name: Retag the image for GitHub Container Registry
run: |
docker tag ${{ matrix.image }} ${{ env.REGISTRY_IMAGE }}-${{ matrix.image }}
docker tag ${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }} ${{ env.REGISTRY_IMAGE }}-${{ matrix.image.name }}:${{ matrix.image.tag }}
- name: Push image to GitHub Container Registry
run: |
docker push ${{ env.REGISTRY_IMAGE }}-${{ matrix.image }}
docker push ${{ env.REGISTRY_IMAGE }}-${{ matrix.image.name }}:${{ matrix.image.tag }}

0 comments on commit 59eaf49

Please sign in to comment.