diff --git a/.github/workflows/___build_variants.yml b/.github/workflows/___build_variants.yml index c8bbba0..8dd6c1f 100644 --- a/.github/workflows/___build_variants.yml +++ b/.github/workflows/___build_variants.yml @@ -35,45 +35,40 @@ jobs: matrix: include: ${{ fromJson(inputs.matrix_include) }} steps: - - name: test + - name: Determine informations + id: determine_informations env: - MATRIX: ${{ toJson(matrix) }} + BASE_TAG: "ghcr.io/${{ github.repository }}:${{ matrix.tag }}${{ matrix.variant }}" + BASE_TAG_SHORT: "ghcr.io/${{ github.repository }}:${{ matrix.minor }}${{ matrix.variant }}" run: | - echo "${MATRIX}" - # - name: Determine informations - # id: determine_informations - # env: - # BASE_TAG: "ghcr.io/${{ github.repository }}:${{ matrix.tag }}${{ matrix.variant }}" - # BASE_TAG_SHORT: "ghcr.io/${{ github.repository }}:${{ matrix.minor }}${{ matrix.variant }}" - # run: | - # echo "base=${BASE_TAG}-base" >> $GITHUB_OUTPUT - # echo "values=${BASE_TAG}-${{ matrix.types }}${{ inputs.enable_minor && format(',{0}-{1}', env.BASE_TAG_SHORT, matrix.types) }}" - # - name: Get Debian version - # id: debian_version - # run: | - # echo value="$(docker run --rm -i "${{ steps.determine_informations.outputs.base }}" sh -c '. /etc/os-release && echo ${VERSION_ID}')" >> $GITHUB_OUTPUT - # - name: Checkout - # uses: actions/checkout@v4 - # with: - # submodules: false - # fetch-depth: 1 - # - name: Setup Buildx - # uses: docker/setup-buildx-action@v3 - # - name: Login to GitHub Packages - Container Registry - # uses: docker/login-action@v3 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - # - name: Build and Push image - # uses: docker/build-push-action@v6 - # with: - # context: "${{ inputs.types_directory }}/${{ matrix.types }}" - # push: true - # pull: true - # github-token: ${{ secrets.GITHUB_TOKEN }} - # tags: ${{ steps.determine_informations.outputs.values }} - # build-args: | - # PLATFORM=${{ inputs.platform }} - # BASE_IMAGE=${{ steps.determine_informations.outputs.base }} - # DEBIAN_VERSION=${{ steps.debian_version.outputs.debian_version }} + echo "base=${BASE_TAG}-base" >> $GITHUB_OUTPUT + echo "values=${BASE_TAG}-${{ matrix.types }}${{ inputs.enable_minor && format(',{0}-{1}', env.BASE_TAG_SHORT, matrix.types) }}" + - name: Get Debian version + id: debian_version + run: | + echo value="$(docker run --rm -i "${{ steps.determine_informations.outputs.base }}" sh -c '. /etc/os-release && echo ${VERSION_ID}')" >> $GITHUB_OUTPUT + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: false + fetch-depth: 1 + - name: Setup Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Packages - Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and Push image + uses: docker/build-push-action@v6 + with: + context: "${{ inputs.types_directory }}/${{ matrix.types }}" + push: true + pull: true + github-token: ${{ secrets.GITHUB_TOKEN }} + tags: ${{ steps.determine_informations.outputs.values }} + build-args: | + PLATFORM=${{ inputs.platform }} + BASE_IMAGE=${{ steps.determine_informations.outputs.base }} + DEBIAN_VERSION=${{ steps.debian_version.outputs.debian_version }}