Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Publish dev image

Publish dev image #21

# "secondly-xxxx" tagged images, used by developers for quick tests, are extremely unstable.
# Whenever any branch is updated, images are automatically built and pushed to image registry.
name: Publish dev image
on:
workflow_dispatch:
env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
amd64:
name: AMD64
runs-on: ubuntu-latest
steps:
- name: Set CURRENT_SECOND as env
run: echo "CURRENT_SECOND=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV
- 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.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ env.IMAGE_NAME }}:dev-${{ env.CURRENT_SECOND }}