Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]' # skip on dependabot because it's not allowed to access secrets
permissions:
contents: read
packages: write
outputs:
app-version: ${{ steps.meta.outputs.version }}
steps:
Expand All @@ -32,7 +32,9 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: capcom6/${{ inputs.app-name }}
images: |
capcom6/${{ inputs.app-name }}
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
Expand All @@ -41,11 +43,18 @@ jobs:
type=semver,pattern={{major}}

- name: Log into Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.username }}
password: ${{ secrets.password }}

- name: Login to Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set APP_VERSION env
run: echo APP_VERSION=$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev ) >> ${GITHUB_ENV}
- name: Set APP_RELEASE env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:

build:
name: Build
permissions:
packages: write
needs:
- test
uses: ./.github/workflows/docker-build.yml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
jobs:
build:
name: Build
permissions:
packages: write
uses: ./.github/workflows/docker-build.yml
with:
app-name: sms-gateway
Expand Down
Loading