Skip to content

Commit

Permalink
new attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
acroca committed Feb 27, 2024
1 parent 99381e4 commit 63abc35
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@ on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v3
name: Checkout repository
uses: actions/checkout@v4

-
name: Set up Docker Buildx
Expand All @@ -19,21 +26,22 @@ jobs:
name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: acroca/fitm
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

-
name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 63abc35

Please sign in to comment.