-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 1.13 KB
/
subnet-containers-latest.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
37
38
name: Push Docker image to latest
on:
push:
branches:
- 'main'
jobs:
build-miner-container-latest:
runs-on:
group: synapsec-larger-runners
permissions:
contents: read # Default permission to read repository contents
packages: write # Permission to write to GitHub Packages
env:
IMAGE_NAME: soundsright-miner
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Podman
run: |
sudo apt-get update
sudo apt-get install -y podman
- name: Build Podman image
run: podman build -t ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest -f miner.Dockerfile
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Push Podman image
run: podman push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
- name: Store image details
run: echo "{name}={image::ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest}" >> $GITHUB_OUTPUTS