-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (23 loc) · 910 Bytes
/
docker-image.yml
File metadata and controls
30 lines (23 loc) · 910 Bytes
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
name: Docker Image CI
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get the git tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag icomputerfreak/notifier-bot:${{ steps.get_tag.outputs.tag }}
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Tag the Docker image as latest
run: docker tag icomputerfreak/notifier-bot:${{ steps.get_tag.outputs.tag }} icomputerfreak/notifier-bot:latest
- name: Push the Docker image to Docker Hub
run: |
docker push icomputerfreak/notifier-bot:${{ steps.get_tag.outputs.tag }}
docker push icomputerfreak/notifier-bot:latest