wolkenschieber is building Docker images #44
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 Docker images | |
run-name: ${{ github.actor }} is building Docker images | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 6' | |
jobs: | |
log-metadata: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- run: echo "The images will be deployed to dockerhub ${{ github.ref == 'refs/heads/master' }}" | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# docker build --no-cache --pull -t wolkenschieber/docker-chromium:latest . | |
- name: Build and push amd64 image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: ${{ github.ref == 'refs/heads/master' }} | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_IMAGENAME }}:latest | |
# docker buildx build --no-cache --platform linux/arm64 --pull -t wolkenschieber/docker-chromium:arm64v8-latest -f Dockerfile.aarch64 . | |
- name: Build and push arm64v8 image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile.aarch64 | |
platforms: linux/arm64/v8 | |
push: ${{ github.ref == 'refs/heads/master' }} | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_IMAGENAME }}:${{ vars.DOCKERHUB_ARM_PREFIX }}-latest | |
- run: echo "Finished with status ${{ job.status }}." |