Skip to content

Commit

Permalink
Update action file
Browse files Browse the repository at this point in the history
  • Loading branch information
diaznet committed Nov 10, 2024
1 parent 7dd9f86 commit 47f1a56
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,48 @@ jobs:

steps:

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
diaznet/arlo-downloader
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Checkout
- uses: actions/checkout@v4

# Build and push Docker image
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: . # Set the context to the current directory
tags: ${{ github.actor }}/${{ github.event.repository.name }}:${{ github.ref_name }}
push: true # Push the image to Docker Hub
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# Log-out of Docker Hub
- name: Log out of Docker Hub
run: docker logout

0 comments on commit 47f1a56

Please sign in to comment.