2021-06-19 07:30:32 +09:00

27 lines
1.2 KiB
YAML

name: Build
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build Docker Images
run: |
git fetch --prune --unshallow
docker build -t activity-relay:$(echo ${GITHUB_SHA}|head -c7) .
- name: Push Docker Images to DockerHub
run: |
docker login -u ${{ secrets.REGISTORY_USER }} -p ${{ secrets.REGISTORY_PASS }}
docker tag activity-relay:$(echo ${GITHUB_SHA}|head -c7) ${{ secrets.REGISTORY_USER }}/activity-relay:$(echo ${GITHUB_SHA}|head -c7)
docker push ${{ secrets.REGISTORY_USER }}/activity-relay:$(echo ${GITHUB_SHA}|head -c7)
- name: Push Docker Images to GitHub Packages
run: |
docker login docker.pkg.github.com -u ${{ secrets.REGISTORY_USER }} -p ${{ secrets.GITHUB_TOKEN }}
docker tag activity-relay:$(echo ${GITHUB_SHA}|head -c7) docker.pkg.github.com/${{ secrets.REGISTORY_USER }}/activity-relay/activity-relay:$(echo ${GITHUB_SHA}|head -c7)
docker push docker.pkg.github.com/${{ secrets.REGISTORY_USER }}/activity-relay/activity-relay:$(echo ${GITHUB_SHA}|head -c7)