Ch03 Image Builds #3879
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: Ch03 Image Builds | |
on: | |
push: | |
paths: | |
- ".github/workflows/ch03.yaml" | |
- "ch03/docker-images/**" | |
schedule: | |
- cron: "0 3 * * 0" | |
jobs: | |
build-amd64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: ch03 | |
working-directory: ./ch03/docker-images | |
run: | | |
docker-compose -f docker-compose.yml -f amd64.yml build --pull | |
docker-compose -f docker-compose.yml -f amd64.yml push | |
build-arm64: | |
runs-on: [self-hosted, Linux, ARM64, docker] | |
steps: | |
- uses: actions/checkout@master | |
- uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: ch03 | |
working-directory: ./ch03/docker-images | |
run: | | |
docker compose -f docker-compose.yml -f arm64.yml build --pull | |
docker compose -f docker-compose.yml -f arm64.yml push | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@master | |
- uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: ch03-windows | |
working-directory: ./ch03/docker-images | |
run: | | |
docker-compose -f docker-compose-windows.yml build | |
docker image push kiamol/ch03-numbers-api:windows | |
push-manifests: | |
runs-on: ubuntu-latest | |
needs: ['build-amd64', 'build-arm64'] | |
steps: | |
- uses: actions/checkout@master | |
- uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: ch03 | |
working-directory: ./ch03/docker-images | |
run: | | |
./push-manifests.ps1 | |
shell: pwsh | |