mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add GHCR.io as publishing target (#4561)
* update deps
* Add GHCR.io as publishing target
Fixes #4560
* add permissions
* Revert "update deps"
This reverts commit cb2f612bb3
.
This commit is contained in:
parent
3294b37ef0
commit
ab7b03ac59
14
.github/workflows/docker.yaml
vendored
14
.github/workflows/docker.yaml
vendored
@ -34,6 +34,8 @@ jobs:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
id-token: write
|
id-token: write
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -95,6 +97,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Log into registry ghcr.io
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # pin@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
id: meta
|
id: meta
|
||||||
@ -102,6 +113,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
inventree/inventree
|
inventree/inventree
|
||||||
|
ghcr.io/inventree/inventree
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
@ -115,6 +128,7 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
commit_hash=${{ env.git_commit_hash }}
|
commit_hash=${{ env.git_commit_hash }}
|
||||||
commit_date=${{ env.git_commit_date }}
|
commit_date=${{ env.git_commit_date }}
|
||||||
|
|
||||||
- name: Sign the published image
|
- name: Sign the published image
|
||||||
if: ${{ false }} # github.event_name != 'pull_request'
|
if: ${{ false }} # github.event_name != 'pull_request'
|
||||||
env:
|
env:
|
||||||
|
Loading…
Reference in New Issue
Block a user