Publish Docker Image #47
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: Publish Docker Image | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'templates/**' | |
- '.github/workflows/publish_docker.yml' | |
- 'Dockerfile' | |
schedule: | |
# on the 1st and 15th of every month | |
- cron: '0 0 1,15 * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: gitpod/workspace-base:latest | |
tags: nateateteen/zshpod:base | |
min: no | |
- image: gitpod/workspace-full:latest | |
tags: nateateteen/zshpod:full,nateateteen/zshpod:latest | |
min: no | |
- image: gitpod/workspace-base:latest | |
tags: nateateteen/zshpod:base-min | |
min: yes | |
- image: gitpod/workspace-full:latest | |
tags: nateateteen/zshpod:full-min | |
min: yes | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
build-args: | | |
IMAGE_NAME=${{ matrix.image }} | |
MIN=${{ matrix.min }} | |
push: true | |
tags: ${{ matrix.tags }} |