-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.43 KB
/
stage.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: Stage
on:
workflow_dispatch:
push:
branches:
- master
env:
PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64/v8
jobs:
stage:
runs-on: ubuntu-latest
environment: staging
name: Build early access and publish to GitHub
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/[email protected]
- name: Setup Docker Buildx
uses: docker/[email protected]
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile', '.dockerignore') }}
- name: Login to GHCR
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GPR_PAT }}
- name: Build images and push to GHCR
uses: docker/[email protected]
with:
context: .
push: true
platforms: ${{ env.PLATFORMS }}
tags: ghcr.io/tomerfi/version-bumper:early-access
build-args: |
VCS_REF=${{ github.sha }}
BUILD_DATE=$(date +'%Y-%m-%d')
VERSION=early-access
cache-from: |
type=local,src=/tmp/.buildx-cache
ghcr.io/tomerfi/version-bumper:early-access
cache-to: type=local,dest=/tmp/.buildx-cache