Created
September 5, 2023 10:00
-
-
Save masious/ef3d9dbfc38c922368c0d1892d040b6c to your computer and use it in GitHub Desktop.
Github Actions example: .github/workflows/build.yml
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: Docker Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
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: Build and push (front) | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: Dockerfile.frontend | |
tags: ghcr.io/masious/my-front | |
cache-from: type=registry,ref=ghcr.io/masious/my-front | |
cache-to: type=inline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment