Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
FWao authored Jul 30, 2024
1 parent 993f641 commit c8d46c5
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check disk space
run: df . -h
- name: Remove unnecessary files
Expand Down Expand Up @@ -45,8 +52,7 @@ jobs:
echo "some packages purged"
- name: Check disk space again
run: df . -h
- name: Checkout repository
uses: actions/checkout@v4


- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -57,9 +63,14 @@ jobs:
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Extract version from tag
id: extract_version
Expand All @@ -70,4 +81,4 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/katherlab:${{ env.VERSION }}
tags: ghcr.io/katherlab/${{ env.IMAGE_NAME}}:${{ env.VERSION }}

0 comments on commit c8d46c5

Please sign in to comment.