Skip to content

alter instructions

alter instructions #19

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- '*'
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_NAMESPACE: ${{ secrets.DOCKER_NAMESPACE }}
DOCKER_REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }}
jobs:
push_to_registry:
if: ${{ startsWith(github.ref, 'refs/tags') }}
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2.0.0
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: api_meta
uses: docker/metadata-action@v4.0.1
with:
images: ${{ env.DOCKER_NAMESPACE }}/${{ env.DOCKER_REPOSITORY }}
- name: Build and push Docker image
uses: docker/build-push-action@v3.0.0
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.api_meta.outputs.tags }}