mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-15 07:36:31 -04:00
feat(ci): use dynamic repository owner and name in Docker actions (#487)
* feat(ci): use dynamic repository owner and name in Docker actions Signed-off-by: Jason Cameron <git@jasoncameron.dev> * feat(ci): support forks Signed-off-by: Jason Cameron <git@jasoncameron.dev> * feat(ci): support forks Signed-off-by: Jason Cameron <git@jasoncameron.dev> * feat(ci): add debug output for Docker repository information Signed-off-by: Jason Cameron <git@jasoncameron.dev> * feat(ci): update Docker image naming convention in workflow Signed-off-by: Jason Cameron <git@jasoncameron.dev> * feat(ci): set lowercase image name in Docker workflow Signed-off-by: Jason Cameron <git@jasoncameron.dev> * feat(ci): remove json/gha branch from Docker workflow triggers Signed-off-by: Jason Cameron <git@jasoncameron.dev> * feat(ci): simplify Docker registry configuration in workflow Signed-off-by: Jason Cameron <git@jasoncameron.dev> --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev>
This commit is contained in:
parent
2b103a9ec7
commit
659b577e0e
4
.github/workflows/docker-pr.yml
vendored
4
.github/workflows/docker-pr.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
|||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/techarohq/anubis
|
images: ghcr.io/${{ github.repository }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: build
|
id: build
|
||||||
@ -58,7 +58,7 @@ jobs:
|
|||||||
npm run container
|
npm run container
|
||||||
env:
|
env:
|
||||||
PULL_REQUEST_ID: ${{ github.event.number }}
|
PULL_REQUEST_ID: ${{ github.event.number }}
|
||||||
DOCKER_REPO: ghcr.io/techarohq/anubis
|
DOCKER_REPO: ghcr.io/${{ github.repository }}
|
||||||
SLOG_LEVEL: debug
|
SLOG_LEVEL: debug
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
|
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
@ -27,6 +27,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Set lowercase image name
|
||||||
|
run: |
|
||||||
|
echo "IMAGE=ghcr.io/${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up Homebrew
|
- name: Set up Homebrew
|
||||||
uses: Homebrew/actions/setup-homebrew@master
|
uses: Homebrew/actions/setup-homebrew@master
|
||||||
|
|
||||||
@ -55,14 +59,14 @@ jobs:
|
|||||||
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: techarohq
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/techarohq/anubis
|
images: ${{ env.IMAGE }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: build
|
id: build
|
||||||
@ -70,12 +74,13 @@ jobs:
|
|||||||
npm ci
|
npm ci
|
||||||
npm run container
|
npm run container
|
||||||
env:
|
env:
|
||||||
DOCKER_REPO: ghcr.io/techarohq/anubis
|
DOCKER_REPO: ${{ env.IMAGE }}
|
||||||
SLOG_LEVEL: debug
|
SLOG_LEVEL: debug
|
||||||
|
|
||||||
|
|
||||||
- name: Generate artifact attestation
|
- name: Generate artifact attestation
|
||||||
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
|
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
|
||||||
with:
|
with:
|
||||||
subject-name: ghcr.io/techarohq/anubis
|
subject-name: ${{ env.IMAGE }}
|
||||||
subject-digest: ${{ steps.build.outputs.digest }}
|
subject-digest: ${{ steps.build.outputs.digest }}
|
||||||
push-to-registry: true
|
push-to-registry: true
|
||||||
|
1
.github/workflows/docs-deploy.yml
vendored
1
.github/workflows/docs-deploy.yml
vendored
@ -13,6 +13,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
if: github.repository == 'TecharoHQ/anubis'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
2
.github/workflows/docs-test.yml
vendored
2
.github/workflows/docs-test.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/techarohq/anubis/docs
|
images: ghcr.io/${{ github.repository }}/docs
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: build
|
id: build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user