diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b94524..db08a0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,9 @@ name: Create kpa-marp-pandoc container image env: - REGISTRY_NAME: ghcr.io - CONTAINER_NAME: mmul-it/kpa-marp-pandoc - CONTAINER_VERSION: latest + REGISTRY_GHCR: ghcr.io/mmul-it + REGISTRY_QUAY: quay.io/mmul + CONTAINER_NAME: kpa-marp-pandoc on: [push] @@ -13,8 +13,17 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the container image - run: docker build . --file Dockerfile --tag ${REGISTRY_NAME}/${CONTAINER_NAME}:${CONTAINER_VERSION} - - name: Login into the container registry - run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ vars.GHCR_USER }} --password-stdin - - name: Push the image into the container registry - run: docker push ${REGISTRY_NAME}/${CONTAINER_NAME}:${CONTAINER_VERSION} + run: docker build . + --file Dockerfile + --tag ${REGISTRY_GHCR}/${CONTAINER_NAME}:${{ github.ref_name }} + --tag ${REGISTRY_GHCR}/${CONTAINER_NAME}:latest + --tag ${REGISTRY_QUAY}/${CONTAINER_NAME}:${{ github.ref_name }} + --tag ${REGISTRY_QUAY}/${CONTAINER_NAME}:latest + - name: Login into the GitHub Container Registry + run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ${REGISTRY_GHCR} --username "${{ vars.GHCR_USER }}" --password-stdin + - name: Login into the Quay Container Registry + run: echo "${{ secrets.QUAY_ROBOT_TOKEN }}" | docker login ${REGISTRY_QUAY} --username "${{ vars.QUAY_ROBOT_NAME }}" --password-stdin + - name: Push the image into the GitHub Container Registry + run: docker push --all-tags ${REGISTRY_GHCR}/${CONTAINER_NAME} + - name: Push the image into the Quay Container Registry + run: docker push --all-tags ${REGISTRY_QUAY}/${CONTAINER_NAME}