-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (38 loc) · 1.15 KB
/
docker.yml
File metadata and controls
41 lines (38 loc) · 1.15 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
# This is a basic workflow to help you get started with Actions
name: Docker Build Action
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
env:
IMAGE_NAME: starwarssounds_bot
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: elraro/StarWarsSounds_bot
fetch-depth: 0
token: ${{ github.token }}
- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v4.0.0
with:
push: false
load: true
tags: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
- name: Push
run: |
docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest