-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.25 KB
/
Copy pathtesting.yml
File metadata and controls
41 lines (38 loc) · 1.25 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
name: Build Docker image and then push to GHCR
on:
push:
branches: [ testing ]
pull_request:
branches: [ testing ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-container:
name: Build container
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
labels: |
org.opencontainers.image.source=https://github.com/binarygeek119/ScreenStage
org.opencontainers.image.title=ScreenStage
tags: |
ghcr.io/binarygeek119/screenstage:testing
ghcr.io/binarygeek119/screenstage:${{ github.run_number }}