forked from kbase/sample_service
-
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.
Merge pull request #9 from jsfillman/develop
Develop
- Loading branch information
Showing
4 changed files
with
21 additions
and
25 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Publish Release Image | |
'on': | ||
release: | ||
branches: | ||
- main | ||
- master | ||
types: | ||
- published | ||
|
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
#! /usr/bin/env bash | ||
|
||
export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') | ||
export MY_APP=$(echo $(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}')"-develop") | ||
export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export COMMIT=$(echo "$SHA" | cut -c -7) | ||
|
||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io | ||
docker pull ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" | ||
docker tag ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP":"latest" | ||
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest" |
14 changes: 8 additions & 6 deletions
14
.github/workflows/develop_rc_release.yaml → .github/workflows/tag_test_latest.yaml
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,24 +1,26 @@ | ||
--- | ||
name: Publish RC Image | ||
name: Tag Latest Test Image | ||
'on': | ||
release: | ||
pull_request: | ||
branches: | ||
- develop | ||
types: | ||
- published | ||
- closed | ||
jobs: | ||
docker_build: | ||
docker_tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out GitHub Repo | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && | ||
github.event.pull_request.merged == true | ||
with: | ||
ref: "${{ github.event.pull_request.head.sha }}" | ||
uses: actions/checkout@v2 | ||
- name: Build and Push to Packages | ||
if: github.event.pull_request.draft == false | ||
env: | ||
PR: "${{ github.event.pull_request.number }}" | ||
SHA: "${{ github.event.pull_request.head.sha }}" | ||
VER: "${{ github.event.release.tag_name }}" | ||
DOCKER_ACTOR: "${{ secrets.GHCR_USERNAME }}" | ||
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}" | ||
run: "./.github/workflows/scripts/develop_rc_release.sh\n" | ||
run: "./.github/workflows/scripts/tag_test_latest.sh\n" |