mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature: publish container image to GHCR (#409)
* feat: publish container image to GHCR Fixes: #408 * add permissions to workflow
This commit is contained in:
parent
d061aa82ea
commit
37ab7068d9
1 changed files with 13 additions and 0 deletions
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
|
|
@ -6,6 +6,9 @@ on:
|
|||
jobs:
|
||||
buildx:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -38,6 +41,12 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push base-image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
|
|
@ -48,6 +57,8 @@ jobs:
|
|||
tags: |
|
||||
coderaiser/cloudcmd:latest
|
||||
coderaiser/cloudcmd:${{ steps.build.outputs.version }}
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ steps.build.outputs.version }}
|
||||
- name: Build and push alpine-image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
|
|
@ -58,3 +69,5 @@ jobs:
|
|||
tags: |
|
||||
coderaiser/cloudcmd:latest-alpine
|
||||
coderaiser/cloudcmd:${{ steps.build.outputs.version }}-alpine
|
||||
ghcr.io/${{ github.repository }}:latest-alpine
|
||||
ghcr.io/${{ github.repository }}:${{ steps.build.outputs.version }}-alpine
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue