updated writer #4
This file contains hidden or 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
name: writer-build-and-push-dev | |
on: | |
push: | |
branches: [new-namespace] | |
paths: | |
- python/*.py | |
- python/common/** | |
- python/writer/** | |
- .github/workflows/build-push-writer.yaml | |
- trigger.txt | |
workflow_dispatch: | |
env: | |
IMAGE_NAME: writer | |
WORKING_DIRECTORY: ./python | |
REPO_KEY: af03 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Artifactory | |
uses: docker/login-action@v1 | |
with: | |
registry: artifacts.developer.gov.bc.ca | |
username: ${{ secrets.ARTIFACTORY_USERNAME }} | |
password: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
# Get SHORT_SHA for the version | |
- name: Get short SHA | |
id: short_sha | |
run: | | |
echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)" | |
echo "Short SHA: $SHORT_SHA" | |
- name: Build Image | |
working-directory: ${{env.WORKING_DIRECTORY}} | |
run: | | |
docker build -t artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev -f writer/Dockerfile . | |
- name: Docker Push to Artifactory | |
run: | | |
docker push artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev |