Skip to content

Don't push :latest tag on pull requests and non-master branches #18

Don't push :latest tag on pull requests and non-master branches

Don't push :latest tag on pull requests and non-master branches #18

Workflow file for this run

name: Build Docker image
on:
push:
branches-ignore:
- master # Covered by docker-push.yml
pull_request:
jobs:
build:
runs-on: ubuntu-latest
# Permissions for GITHUB_TOKEN
permissions:
contents: read # To check out repo
packages: read # To read NPM registry
steps:
- uses: actions/checkout@v3
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Set up .npmrc to access GitHub NPM registry
uses: ./.github/actions/setup-npmrc
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: false
tags: ghcr.io/gunet/wallet-backend:latest