Bump http-cache-semantics from 4.1.0 to 4.1.1 in /web-gui #189
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: Docker Image CI | |
on: | |
push: | |
branches: [master] | |
tags: ["v*.*.*"] | |
pull_request: | |
branches: [master] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
IMAGE_NAME_DOCKER_HUB: thmmniii/digital-classroom | |
jobs: | |
build: | |
name: Build and Deploy Docker images | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@v1 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log into registry DockerHub | |
uses: docker/login-action@v1 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
username: ${{ secrets.DOCKER_LOGIN }} | |
password: ${{ secrets.DOCKER_PWD }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ env.IMAGE_NAME_DOCKER_HUB }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
builder: ${{ steps.buildx.outputs.name }} | |
cache-from: type=gha,scope=${{ github.workflow }} | |
cache-to: type=gha,scope=${{ github.workflow }} |