mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
Build docker image on push only
This commit is contained in:
parent
f4fd78fc5d
commit
67f6287a2b
22
.github/workflows/docker.yaml
vendored
Normal file
22
.github/workflows/docker.yaml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
name: Docker Image
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Inject slug/short variables
|
||||||
|
uses: rlespinasse/github-slug-action@v2.x
|
||||||
|
- name: Set variables
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=REPOSITORY::$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]')"
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v1.1.0
|
||||||
|
with:
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ github.token }}
|
||||||
|
registry: docker.pkg.github.com
|
||||||
|
repository: ${{ env.REPOSITORY }}/server
|
||||||
|
tag_with_sha: true
|
||||||
|
tag_with_ref: true
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: CI
|
name: Test
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|
@ -43,23 +43,4 @@ jobs:
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: server.zip
|
name: server.zip
|
||||||
path: server/target/server*.zip
|
path: server/target/server*.zip
|
||||||
docker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Inject slug/short variables
|
|
||||||
uses: rlespinasse/github-slug-action@v2.x
|
|
||||||
- name: Set variables
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=REPOSITORY::$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]')"
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v1.1.0
|
|
||||||
with:
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ github.token }}
|
|
||||||
registry: docker.pkg.github.com
|
|
||||||
repository: ${{ env.REPOSITORY }}/server
|
|
||||||
tag_with_sha: true
|
|
||||||
tag_with_ref: true
|
|
||||||
Loading…
Reference in a new issue