35 lines
794 B
YAML
35 lines
794 B
YAML
name: Build and Push Matrix-to Docker Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Generate timestamp
|
|
id: vars
|
|
run: echo "TAG=$(date +%Y%m%d-%H%M)" >> $GITHUB_ENV
|
|
|
|
- name: Login to Docker Hub
|
|
run: |
|
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \
|
|
-u "${{ secrets.DOCKER_USERNAME }}" \
|
|
--password-stdin
|
|
|
|
- name: Build image
|
|
run: |
|
|
docker build \
|
|
-t domoel/matrix-to:latest \
|
|
-t domoel/matrix-to:${TAG} \
|
|
.
|
|
|
|
- name: Push image
|
|
run: |
|
|
docker push domoel/matrix-to:latest
|
|
docker push domoel/matrix-to:${TAG}
|