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.
feat: enable github actions for main branch
Signed-off-by: Glenn Marcy <gmarcy@us.ibm.com>
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Create and publish a Docker 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 }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
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 | ||
- 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 |
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,3 +1,5 @@ | ||
load_module /etc/nginx/modules/ngx_http_proxy_connect_module.so; | ||
|
||
user nginx; | ||
worker_processes auto; | ||
|
||
|