This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
Merge pull request #11 from jerolimov/fix-obtaining-vcs-issue #6
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 | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
env: | |
MAIN_REGISTRY: ghcr.io | |
MAIN_USERNAME: ${{ github.actor }} | |
MAIN_PASSWORD: ${{ github.token }} | |
MAIN_REPOSITORY: ${{ github.repository }} | |
jobs: | |
setup: | |
uses: janus-idp/.github/.github/workflows/setup.yaml@main | |
with: | |
default_tag_version: "latest" | |
build_platforms: "linux/amd64,linux/arm64" | |
build-and-push-images: | |
runs-on: ubuntu-latest | |
needs: ["setup"] | |
strategy: | |
matrix: | |
platform: ${{ fromJson(needs.setup.outputs.dist_matrix) }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # pin@v3 | |
- name: Build and push images | |
uses: janus-idp/.github/.github/actions/build-and-push@main | |
with: | |
platform: ${{ matrix.platform }} | |
image_tag: ${{ needs.setup.outputs.image_tag }} | |
mirror-images-and-create-manifests: | |
runs-on: ubuntu-latest | |
needs: ["setup", "build-and-push-images"] | |
strategy: | |
matrix: | |
include: | |
- registry: ghcr.io | |
username: ${{ github.actor }} | |
password: GITHUB_TOKEN | |
repository: ${{ github.repository }} | |
- registry: quay.io | |
username: ${{ vars.QUAY_USERNAME }} | |
password: QUAY_TOKEN | |
repository: janus-idp/webterminal-proxy | |
steps: | |
- name: Mirror images and create manifests | |
uses: janus-idp/.github/.github/actions/mirror-images-and-create-manifests@main | |
with: | |
image_platform_tags: ${{ needs.setup.outputs.image_platform_tags }} | |
image_tag: ${{ needs.setup.outputs.image_tag }} | |
registry: ${{ matrix.registry }} | |
username: ${{ matrix.username }} | |
password: ${{ secrets[matrix.password] }} | |
repository: ${{ matrix.repository }} |