GoBlog/.github/workflows/master.yml

43 lines
1.0 KiB
YAML
Raw Normal View History

name: Master workflow
2022-03-24 18:51:22 +00:00
on:
push:
branches: [ master ]
jobs:
docker:
2022-04-16 04:22:14 +00:00
name: Test and build Docker images
2022-03-24 18:51:22 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
2022-03-24 18:51:22 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
config-inline: |
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- name: Login to GitHub container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2022-07-17 16:28:27 +00:00
- name: Test
uses: docker/build-push-action@v2
with:
push: false
target: test
tags: test
2022-03-24 18:51:22 +00:00
- name: Build base image
2022-04-06 08:44:43 +00:00
uses: docker/build-push-action@v2
with:
push: true
target: base
tags: ghcr.io/jlelse/goblog:latest
2022-03-24 18:51:22 +00:00
- name: Build tools image
2022-04-06 08:44:43 +00:00
uses: docker/build-push-action@v2
with:
push: true
target: tools
tags: ghcr.io/jlelse/goblog:tools