diff --git a/.github/workflows/createContainer.yml b/.github/workflows/createContainer.yml index 88e70b6e9..aa05cbe40 100644 --- a/.github/workflows/createContainer.yml +++ b/.github/workflows/createContainer.yml @@ -2,27 +2,30 @@ name: Github Packages Release on: push: - branches: [ releases ] - pull_request: - branches: [ releases ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: + branches: + - master + - development + tags: + - v* jobs: build: runs-on: ubuntu-latest steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - + + - name: Extract branch/tag name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" + id: extract_branch + # make sure you have "Improved Container Support" enabled for both your personal and/or Organization accounts! - # TODO shift repo target to https://github.com/pmorelli92/github-container-registry-build-push/pull/1 - - uses: LibreTexts/github-container-registry-build-push@main + - uses: pmorelli92/github-container-registry-build-push@2.0.0 name: Build and Publish latest service image with: # Read note below to see how to generate the PAT - personal-access-token: ${{secrets.GITHUB_TOKEN}} + github-push-secret: ${{secrets.GITHUB_TOKEN}} docker-image-name: ww-renderer - docker-image-tag: latest + docker-image-tag: ${{ steps.extract_branch.outputs.branch }} diff --git a/k8/Renderer.yaml b/k8/Renderer.yaml index 8ec3b9a1a..eafcd46f3 100644 --- a/k8/Renderer.yaml +++ b/k8/Renderer.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: wwrenderer - image: ghcr.io/drdrew42/ww-renderer + image: ghcr.io/drdrew42/ww-renderer:master resources: requests: cpu: "0.5"