Skip to content

Commit

Permalink
chore: add test build docker
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Jan 16, 2021
1 parent 5e90c7a commit 758602b
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/testbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build on tag

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Set version
run: |
echo 'latest' > asset/version
cat asset/version
env | grep GITHUB_SHA
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pike:${{ steps.vars.outputs.tag }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 758602b

Please sign in to comment.