V0.5.13 - Added a log on the discourse sync cron task #89
Workflow file for this run
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
name: build | |
on: | |
release: | |
types: [published] | |
env: | |
IMAGE_NAME: insights | |
DOCKERFILE: dockerfiles/php/Dockerfile | |
CI: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Define variables | |
id: vars | |
run: | | |
echo ::set-output name=CI_COMMIT_REF_SLUG::${GITHUB_REF#refs/*/} | |
echo ::set-output name=CI_REGISTRY_IMAGE::docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME | |
- name: Log into registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | |
- name: Pull existing Docker image | |
run: | | |
docker pull ${CI_REGISTRY_IMAGE}:master || true | |
- name: Build image | |
run: docker build --pull -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG} --cache-from ${CI_REGISTRY_IMAGE}:master -f ${DOCKERFILE} . | |
env: | |
CI_COMMIT_REF_SLUG: ${{ steps.vars.outputs.CI_COMMIT_REF_SLUG }} | |
CI_REGISTRY_IMAGE: ${{ steps.vars.outputs.CI_REGISTRY_IMAGE }} | |
- name: Push the latest Docker image | |
run: | | |
docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG} | |
env: | |
CI_COMMIT_REF_SLUG: ${{ steps.vars.outputs.CI_COMMIT_REF_SLUG }} | |
CI_REGISTRY_IMAGE: ${{ steps.vars.outputs.CI_REGISTRY_IMAGE }} |