Skip to content

Commit

Permalink
Merge pull request #9 from jsfillman/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jsfillman authored Feb 23, 2022
2 parents 9a9313e + 6b8dde5 commit 8ed4184
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/workflows/prod_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Publish Release Image
'on':
release:
branches:
- main
- master
types:
- published
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/scripts/develop_rc_release.sh

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/scripts/tag_test_latest.sh
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"
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"

0 comments on commit 8ed4184

Please sign in to comment.