Skip to content

Remove new line before output #10

Remove new line before output

Remove new line before output #10

Workflow file for this run

name: Build and Push Container Image
on: [push]
env:
IMAGE_NAME: ghcr.io/4armed/metacreds
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Get version
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_SHA} | cut -c1-7)
- name: Build the tagged Docker image
run: docker build . -f build/Dockerfile --tag ${{ env.IMAGE_NAME }}:${{steps.vars.outputs.tag}} --build-arg EXECUTABLE=metacreds
- name: Push the tagged Docker image
run: docker push ${{ env.IMAGE_NAME }}:${{steps.vars.outputs.tag}}
- name: Tag image as latest
run: docker tag ${{ env.IMAGE_NAME }}:${{steps.vars.outputs.tag}} ${{ env.IMAGE_NAME }}:latest
- name: Push latest
run: docker push ${{ env.IMAGE_NAME }}:latest