docker-apps-view/.gitea/workflows/build-docker.yml
ksyasuda 18e8fdf239
Some checks failed
Build and Upload Python Package / build (push) Has been cancelled
Build Docker Image / build (push) Successful in 24s
update docker build script to use current version
2024-08-17 18:43:02 -07:00

33 lines
990 B
YAML

name: Build Docker Image
on:
push:
branches:
- senpai
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Read current version
id: get_version
run: echo "current_version=$(cat version.txt)" >> $GITHUB_ENV
- name: Log in to Gitea Docker Registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login https://gitea.suda.codes -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
gitea.suda.codes/sudacode/docker-apps-view:${{ env.current_version }}
gitea.suda.codes/sudacode/docker-apps-view:latest
- name: Log out from Gitea Docker Registry
run: docker logout https://gitea.suda.codes