-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
95 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,32 @@ | ||
name: Docker Dev | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
push_dockerhub: | ||
name: Push new Docker image to Docker Hub (latest) | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_TOKEN }} | ||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build new docker image | ||
run: docker build --no-cache . -t USER/PIPELINE:devel | ||
|
||
- name: Push Docker image to DockerHub (latest) | ||
run: | | ||
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | ||
docker push USER/PIPELINE:devel |
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,32 @@ | ||
name: Docker Publish | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
push_dockerhub: | ||
name: Push new Docker image to Docker Hub (latest) | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_TOKEN }} | ||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build new docker image | ||
run: docker build --no-cache . -t USER/PIPELINE:latest | ||
|
||
- name: Push Docker image to DockerHub (latest) | ||
run: | | ||
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | ||
docker push ikmUSERb/PIPELINE: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Docker Release | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_dockerhub: | ||
name: Push new Docker image to Docker Hub (release) | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_TOKEN }} | ||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build new docker image | ||
run: docker build --no-cache . -t USER/PIPELINE:latest | ||
|
||
- name: Push Docker image to DockerHub (release) | ||
run: | | ||
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | ||
docker push USER/PIPELINE:latest | ||
docker tag USER/PIPELINE:latest USER/PIPELINE:${{ github.event.release.tag_name }} | ||
docker push USER/PIPELINE:${{ github.event.release.tag_name }} |