fix(linting): Fixed spaces for linting action to pass #11
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: "Continuous Deployment" | |
on: | |
push: | |
branches: ["main", "dev"] | |
jobs: | |
push_to_registry: | |
name: Push Docker Image to GitHub Packages | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create Short SHA | |
uses: benjlevesque/[email protected] | |
id: short-sha | |
with: | |
length: 8 | |
- name: Set image name | |
id: set-image-name | |
run: | | |
if [ "${{ github.ref }}" == "refs/heads/main" ]; then | |
echo "BINARY_NAME=rpl-service" >> $GITHUB_ENV | |
else | |
echo "BINARY_NAME=rpl-service-dev" >> $GITHUB_ENV | |
fi | |
shell: /usr/bin/bash -e {0} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push to GitHub Packages | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
secrets: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USER=${{ github.actor }} | |
context: . | |
push: true | |
tags: | | |
ghcr.io/willytonkas/${{env.BINARY_NAME}}:latest |