Updated github actions

This commit is contained in:
tess1o
2024-07-08 22:51:44 +03:00
parent 9f1d0dc520
commit 8ddf42a9e4

View File

@@ -2,40 +2,37 @@ name: Docker Image CI
on:
push:
branches: [ "main" ]
tags: ['*']
branches:
- main
tags:
- '*'
pull_request:
branches: [ "main" ]
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Extract GitHub tag
- name: Extract GitHub tag
id: extract_tag
run: |
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/')
-
name: Print GitHub tag
- name: Print GitHub tag
run: |
echo "The value of GIT_TAG is: $GIT_TAG"
if: startsWith(github.ref, 'refs/tags/')
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true