-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CICD push to docker on release (#15)
- Loading branch information
Showing
3 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
.github/workflows/docker-image.yml → .github/workflows/docker-alpha.yml
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Update Docker beta tag | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
run: echo "DOCKER_TAG=$(date +%s)" >> $GITHUB_ENV | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build the Docker image | ||
run: docker build . --file docker/Dockerfile --tag nylonee/watchlistarr:${DOCKER_TAG} | ||
- name: Push Docker image | ||
run: | | ||
docker tag nylonee/watchlistarr:${DOCKER_TAG} nylonee/watchlistarr:beta | ||
docker push nylonee/watchlistarr:${DOCKER_TAG} | ||
docker push nylonee/watchlistarr:beta |
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,28 @@ | ||
name: Docker Release CI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up environment | ||
run: echo "DOCKER_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build the Docker image | ||
run: docker build . --file docker/Dockerfile --tag nylonee/watchlistarr:${DOCKER_TAG} | ||
- name: Push Docker image | ||
run: | | ||
docker tag nylonee/watchlistarr:${DOCKER_TAG} nylonee/watchlistarr:latest | ||
docker push nylonee/watchlistarr:${DOCKER_TAG} | ||
docker push nylonee/watchlistarr:latest |