Skip to content

Commit

Permalink
CI: update to the latest Docker actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Oct 20, 2024
1 parent d51972b commit 679049e
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build and Push Docker Images
uses: docker/build-push-action@v6
- name: Extract metadata for Docker
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
id: meta
uses: docker/metadata-action@v5
with:
images: codingteam/codingteam.org.ru
tags: type=ref,event=branch

- name: Login to Docker Hub
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: codingteam/codingteam.org.ru
tag_with_ref: true
tags: latest

- name: Build and Push Docker Images
uses: docker/build-push-action@v6
with:
tags: |
${{ steps.meta.outputs.tags }}
codingteam/codingteam.org.ru:latest
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') && 'true' || 'false' }}

0 comments on commit 679049e

Please sign in to comment.