-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.52 KB
/
deploy copy.yml
File metadata and controls
52 lines (44 loc) · 1.52 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build and Push to GHCR
on:
push:
branches:
- release
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write # Required to create the Git Tag
packages: write # Required to push to GHCR
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version and push tag
id: tagger
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
- name: Log in to GHCR
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.tagger.outputs.new_tag }}
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
context: .
containerfiles: ./Dockerfile
- name: Push to GHCR
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}/{{ github.repository_name }}