Feature(ISSUE 79) - Node runner #1
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: Deploy Runner | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["dev"] | |
tags: ["v*"] | |
paths: | |
- src/Runner/** | |
- .github/workflows/deploy-runner.yml | |
pull_request: | |
branches: ["dev"] | |
paths: | |
- src/Runner/** | |
- .github/workflows/deploy-runner.yml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "src/Runner" | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Docker Login | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v1.10.0 | |
with: | |
username: ${{ secrets.REGISTRY_LOGIN }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Set image tags | |
if: github.event_name != 'pull_request' | |
id: tag | |
run: | | |
if [ "${{ startsWith(github.ref, 'refs/tags/') }}" = true ]; then | |
echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" | |
else | |
echo "::set-output name=tag::dev" | |
fi | |
- name: Build and push Docker images (DEV) | |
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/heads/dev') | |
uses: docker/build-push-action@v2.7.0 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: jpcarpanezi/houston-runner:dev | |
file: src/Runner/Dockerfile | |
context: ./src/Runner | |
- name: Build and push Docker images (TAGS) | |
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') | |
uses: docker/build-push-action@v2.7.0 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: | | |
jpcarpanezi/houston-runner:${{ steps.tag.outputs.tag }} | |
jpcarpanezi/houston-runner:latest | |
file: src/Runner/Dockerfile | |
context: ./src/Runner |