Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius authored and kerruan committed Oct 14, 2023
1 parent 18825dc commit b9d06cd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
name: Compile and Test
runs-on: ubuntu-latest

permissions: write-all
strategy:
matrix:
build-type: [Release, RelWithDebInfo]
Expand Down Expand Up @@ -81,6 +81,7 @@ jobs:
docker:
name: Build Docker Image
runs-on: ubuntu-latest
permissions: write-all
needs: build
if: ${{ github.event_name != 'schedule' }}

Expand Down Expand Up @@ -109,18 +110,18 @@ jobs:
id: docker-vars
with:
image-name: ghcr.io/${{ github.repository }}/base
registry-secret: ${{ secrets.GHCR_PAT }}
registry-secret: ${{ secrets.GITHUB_TOKEN }}

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

- name: Login to GitHub
if: ${{ steps.docker-vars.outputs.has-docker-secret == 'true' }}
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ steps.docker-vars.outputs.docker-secret }}
password: ${{ steps.docker-vars.outputs.docker-secret }}

- name: Build and push
uses: docker/build-push-action@v2
Expand All @@ -133,8 +134,8 @@ jobs:
labels: |
org.opencontainers.image.title=${{ fromJson(steps.repo.outputs.result).name }}
org.opencontainers.image.description=${{ fromJson(steps.repo.outputs.result).description }}
org.opencontainers.image.url=${{ fromJson(steps.repo.outputs.result).homepage }}
org.opencontainers.image.source=${{ fromJson(steps.repo.outputs.result).html_url }}
org.opencontainers.image.url=${{ fromJson(steps.repo.outputs.result).html_url }}
org.opencontainers.image.source=${{ fromJson(steps.repo.outputs.result).clone_url }}
org.opencontainers.image.version=${{ steps.docker-vars.outputs.version }}
org.opencontainers.image.created=${{ steps.docker-vars.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
Expand Down

0 comments on commit b9d06cd

Please sign in to comment.