Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
  • Loading branch information
gfanton committed Apr 10, 2024
1 parent 6c9e037 commit 6ff8fd0
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get commit SHA
id: commit
run: echo "sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"

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

Expand All @@ -36,25 +40,10 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: "${{ github.event_name != 'pull_request' }}"
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
# - name: Build main Docker image
# env:
# owner: ${{ github.repository_owner }}
# reponame: ${{ github.event.repository.name }}
# platform: linux/arm64,linux/amd64
# run: |
# docker buildx build \
# -t ghcr.io/${owner}/${reponame}
# --platform ${platform} \
# --tag ghcr.io/${owner}/${reponame}:latest \
# --tag ghcr.io/${owner}/${reponame}:${GITHUB_SHA::8} \
# .

# docker tag ghcr.io/${owner}/${reponame}:latest ghcr.io/${owner}/${reponame}:${GITHUB_SHA::8}
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.commit.outputs.sha }}
build-slim:
runs-on: ubuntu-latest
Expand All @@ -65,10 +54,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get commit SHA
id: commit
run: echo "sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"

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


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

Expand All @@ -88,4 +80,4 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ matrix.target }}:latest
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ matrix.target }}:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ matrix.target }}:${{ steps.commit.outputs.sha }}

0 comments on commit 6ff8fd0

Please sign in to comment.