forked from coreweave/docker-registry-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes to make the container services more docker agnostic
Signed-off-by: Glenn Marcy <gmarcy@us.ibm.com>
- Loading branch information
Showing
19 changed files
with
178 additions
and
838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,51 @@ | ||
name: Create and publish a Docker image | ||
name: Create and publish a container image | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
|
||
env: | ||
GHCR_IO_USER: ${{ github.actor }} | ||
GHCR_IO_TOKEN: ${{ github.token }} | ||
DOCKER_IO_USER: ${{ secrets.DOCKER_IO_USER }} | ||
DOCKER_IO_TOKEN: ${{ secrets.DOCKER_IO_TOKEN }} | ||
REPO_NAME: ${{ github.repository }} | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4.1.7 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3.2.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3.5.0 | ||
|
||
- name: Login to GHCR | ||
uses: docker/login-action@v3.3.0 | ||
with: | ||
submodules: recursive | ||
- name: Docker logins | ||
run: | | ||
docker login -u="$GHCR_IO_USER" -p="$GHCR_IO_TOKEN" ghcr.io | ||
docker login -u="$DOCKER_IO_USER" -p="$DOCKER_IO_TOKEN" docker.io | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
- name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT | ||
- name: Build the Docker image | ||
run: | | ||
docker build ./ --tag ghcr.io/$REPO_NAME:${{ steps.date.outputs.date }} | ||
- name: Docker Push | ||
run: | | ||
docker push ghcr.io/$REPO_NAME:${{ steps.date.outputs.date }} | ||
docker tag ghcr.io/$REPO_NAME:${{ steps.date.outputs.date }} ghcr.io/$REPO_NAME:latest | ||
docker push ghcr.io/$REPO_NAME:latest | ||
run: echo "date=$(date -u +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT | ||
|
||
- name: Docker meta | ||
id: metadata | ||
uses: docker/metadata-action@v5.5.1 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=${{ steps.date.outputs.date }} | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v6.5.0 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
labels: ${{ steps.metadata.outputs.labels }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.idea | ||
*.iml | ||
**/docker_mirror_cache | ||
**/docker_mirror_certs | ||
**/registry_proxy_mirror_cache | ||
**/registry_proxy_mirror_certs |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.