Skip to content

Update dome.yml

Update dome.yml #212

name: Docker Image CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
- name: Docker Login
# You may pin to the exact commit or the version.
# uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
uses: docker/[email protected]
with:
# Username used to log against the Docker registry
username: ${{ secrets.DOCKER_USERNAME }} # optional
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.DOCKER_PASSWORD }} # optional
- name: Docker Metadata action
# You may pin to the exact commit or the version.
# uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a
id: meta
uses: docker/[email protected]
with:
# List of Docker images to use as base name for tags
images: penndu/nsfw-api
# List of tags as key-value pair attributes
tags: latest # optional
- name: Build and push Docker images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94
uses: docker/[email protected]
with:
# List of metadata for an image
labels: ${{ steps.meta.outputs.labels }} # optional
# List of target platforms for build
platforms: linux/amd64,linux/arm64,linux/arm # optional
# Push is a shorthand for --output=type=registry
push: true # optional, default is false
# List of tags
tags: ${{ steps.meta.outputs.tags }} # optional