-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (31 loc) · 1.01 KB
/
publish-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Publish image to GHCR
on:
workflow_dispatch:
push:
branches:
- main
- ms-publish-docker
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Log into GitHub Container Registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ghcr.io/guardian
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push container image
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
with:
file: ./Dockerfile
push: true
tags: ghcr.io/guardian/actions-prnouncer:latest
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: true