-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from Starfly-13/same-shite-different-registry
Modify CI workflow for building to container registry
- Loading branch information
Showing
3 changed files
with
18 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish to Vultr | ||
name: Publish to Docker Registry | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -15,13 +15,19 @@ jobs: | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# generate the images and tags we'll publish to the registry | ||
# enable built or pulled docker images to be cached | ||
- name: Enable Docker Cache | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('dependencies.sh') }} | ||
|
||
# generate the images and tags that we'll publish to the registry | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
sjc.vultrcr.com/starfly13/starfly13 | ||
docker.ss13.host/starfly13 | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=raw,value={{date 'YYYYMMDDHHmmss'}} | ||
|
@@ -36,12 +42,12 @@ jobs: | |
uses: docker/setup-buildx-action@v3 | ||
|
||
# log in to the registry | ||
- name: Login to Vultr Container Registry | ||
- name: Login to Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: sjc.vultrcr.com | ||
username: ${{ secrets.VULTR_USERNAME }} | ||
password: ${{ secrets.VULTR_APIKEY }} | ||
registry: docker.ss13.host | ||
username: ${{ secrets.REGISTRY_USERNAME }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
||
# build and push to the registry | ||
- name: Build and push | ||
|
@@ -51,3 +57,5 @@ jobs: | |
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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
File renamed without changes.