Skip to content

Commit

Permalink
Add release automation and bump go version in Dockerfile (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai authored Jul 25, 2023
1 parent e0430d9 commit 37a6c0c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker Plugin Publish
on:
workflow_dispatch: null
release:
types: [ published ]
jobs:
oci_publish:
name: Build and publish the docker plugin
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: setup python 3
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push to DockerHub
run: make deploy
env:
PLUGIN_VERSION: ${{ github.event.release.tag_name }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18.3-alpine as builder
FROM golang:1.20-alpine as builder
ENV GO111MODULE=on
ARG VERSION=0
COPY . /docker-volume-linode
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export GO111MODULE=on

all: clean build

deploy:
deploy: $(PLUGIN_DIR)
# workaround for plugin
docker plugin rm -f ${PLUGIN_NAME} 2>/dev/null || true
docker plugin create ${PLUGIN_NAME} ./$(PLUGIN_DIR)
Expand Down

0 comments on commit 37a6c0c

Please sign in to comment.