chore(deps): update mcr.microsoft.com/windows/nanoserver:1809 docker … #925
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: | |
env: | |
OWNER: ${{ github.repository_owner }} | |
FILE: docuum | |
IMAGE: ghcr.io/${{ github.repository_owner }}/docuum | |
BUILDKIT_PROGRESS: plain | |
BUILDX_NO_DEFAULT_ATTESTATIONS: true | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
windows: | |
runs-on: windows-${{ matrix.os }} | |
timeout-minutes: 60 | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
os: [2019,2022] | |
env: | |
BASE: ${{ matrix.os }} | |
TAG: windows-${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Init | |
run: ./bin/init.sh | |
shell: bash | |
# ignore not yet existing images | |
- name: Fetch the docker images | |
run: | | |
docker pull ${{ env.IMAGE }} | |
docker pull ${{ env.IMAGE }}:${{ env.TAG }} | |
docker pull ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }} | |
continue-on-error: true | |
- name: Build the docker image | |
run: | | |
docker build \ | |
-t ${{ env.IMAGE }}:${{ env.TAG }} \ | |
-t ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }} \ | |
--cache-from ${{ env.IMAGE }} \ | |
--cache-from ${{ env.IMAGE }}:${{ env.TAG }} \ | |
--cache-from ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }} \ | |
-f Dockerfile.${{ env.BASE }} \ | |
. | |
working-directory: ./windows | |
shell: bash | |
- name: Test run | |
run: docker compose --file docker-compose.test.yml run sut | |
working-directory: ./windows | |
env: | |
IMAGE: ${{ env.IMAGE }}:${{ env.TAG }} | |
- name: Log into registry | |
if: github.ref == 'refs/heads/main' | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Publish the docker images | |
if: github.ref == 'refs/heads/main' | |
run: | | |
docker push ${{ env.IMAGE }}:${{ env.TAG }} | |
docker push ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }} | |
linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
permissions: | |
contents: read | |
packages: write | |
env: | |
TAG: linux-amd64 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Init | |
run: ./bin/init.sh | |
shell: bash | |
- name: docker-config | |
uses: containerbase/internal-tools@7967a205f4acf76ad2d414d6a074b58a52739986 # v3.4.15 | |
with: | |
command: docker-config | |
- name: Build the Docker image | |
run: docker buildx bake test | |
- name: Test run | |
run: docker compose --file docker-compose.test.yml run sut | |
working-directory: ./linux | |
env: | |
IMAGE: ${{ env.IMAGE }}:${{ env.TAG }} | |
- name: Log into registry | |
if: github.ref == 'refs/heads/main' | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Publish the Docker image | |
if: github.ref == 'refs/heads/main' | |
run: docker buildx bake build | |
multi-arch: | |
needs: [linux, windows] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
timeout-minutes: 30 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: docker-config | |
uses: containerbase/internal-tools@7967a205f4acf76ad2d414d6a074b58a52739986 # v3.4.15 | |
with: | |
command: docker-config | |
- name: Log into registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Init | |
run: ./bin/init.sh | |
- name: Build the Docker multiarch manifest | |
run: | | |
docker manifest create ${{ env.IMAGE }} \ | |
${{ env.IMAGE }}:linux-amd64 \ | |
${{ env.IMAGE }}:windows-2019 \ | |
${{ env.IMAGE }}:windows-2022 | |
docker manifest create ${{ env.IMAGE }}:${{ env.VERSION }} \ | |
${{ env.IMAGE }}:${{ env.VERSION }}-linux-amd64 \ | |
${{ env.IMAGE }}:${{ env.VERSION }}-windows-2019 \ | |
${{ env.IMAGE }}:${{ env.VERSION }}-windows-2022 | |
- name: Publish the Docker multiarch manifest | |
run: | | |
docker manifest push ${{ env.IMAGE }} | |
docker manifest push ${{ env.IMAGE }}:${{ env.VERSION }} | |
- name: Inspect the Docker multiarch manifest | |
run: docker manifest inspect ${{ env.IMAGE }} | |
release: | |
needs: multi-arch | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Init | |
run: ./bin/init.sh | |
- uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 | |
with: | |
allowUpdates: true | |
body: See https://github.com/stepchowfun/docuum/blob/HEAD/CHANGELOG.md for more changes | |
commit: ${{ github.sha }} | |
name: ${{ env.VERSION }} | |
tag: v${{ env.VERSION }} | |
token: ${{ secrets.GITHUB_TOKEN }} |