-
Notifications
You must be signed in to change notification settings - Fork 100
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 #326 from kubewharf/ci-test
feat: push images to dockerhub
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build and push latest images to DockerHub | ||
|
||
on: | ||
push: | ||
branches: ["main", "ci-test"] | ||
|
||
permissions: | ||
packages: write | ||
|
||
jobs: | ||
publish-images-to-dockerhub: | ||
name: Publish to DockerHub | ||
if: ${{ github.repository == 'kubewharf/kubeadmiral' }} | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER_NAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and publish images | ||
env: | ||
REGISTRY: kubewharf | ||
TAG: latest | ||
run: make upload-images |
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,30 @@ | ||
name: Build and push released images to DockerHub | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
permissions: | ||
packages: write | ||
|
||
jobs: | ||
publish-images-to-dockerhub: | ||
name: Publish to DockerHub | ||
if: ${{ github.repository == 'kubewharf/kubeadmiral' }} | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER_NAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and publish images | ||
env: | ||
REGISTRY: kubewharf | ||
TAG: ${{ github.ref_name }} | ||
run: make upload-images |
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