Skip to content

Commit

Permalink
Testing another way to deploy docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Slingexe authored Feb 4, 2025
1 parent 8c91f9f commit cf7621c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/github-docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Publish Docker image
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version tag for the Docker image'
required: true
default: 'latest'

jobs:
push_to_registries:
Expand All @@ -14,14 +20,19 @@ jobs:
attestations: write
id-token: write
steps:
- name: Set Vars
run: |
REPO_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
- name: Check out the repo
uses: actions/checkout@v4

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

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
Expand All @@ -35,8 +46,8 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
my-docker-hub-namespace/my-docker-hub-repository
ghcr.io/${{ github.repository }}
${{ env.REPO_NAME }}
ghcr.io/${{ env.REPO_NAME }}
- name: Build and push Docker images
id: push
Expand Down

0 comments on commit cf7621c

Please sign in to comment.