Skip to content

Commit

Permalink
chore: changed docker image job
Browse files Browse the repository at this point in the history
  • Loading branch information
demtario committed Mar 27, 2024
1 parent 6bed834 commit 01ab652
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
21 changes: 21 additions & 0 deletions .github/actions/docker/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Prepare docker
description: Specific steps to prepare docker environment
inputs:
username:
required: true
password:
required: true
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ inputs.username }}
password: ${{ inputs.password }}
14 changes: 4 additions & 10 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,15 @@ on: workflow_dispatch
# - release/*

jobs:
run:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Prepare docker
uses: ./.github/actions/docker
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create image tag
- name: Generate tag
env:
IMAGE_TAG: '${{ github.ref_name }}'
run: echo "IMAGE_TAG=${IMAGE_TAG/\//-}" >> $GITHUB_ENV
Expand Down

0 comments on commit 01ab652

Please sign in to comment.